Skip to content

Instantly share code, notes, and snippets.

@mazgi
Created March 30, 2012 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazgi/2249596 to your computer and use it in GitHub Desktop.
Save mazgi/2249596 to your computer and use it in GitHub Desktop.
Xcodeでビルド時のリビジョン取得するのにこーゆースクリプトを登録してる
REVISION=$(svn info 2> /dev/null | grep Revision | sed -e 's/Revision: //')
if [ -z ${REVISION} ]; then
REVISION=$(git svn info 2> /dev/null | grep Revision | sed -e 's/Revision: //')
fi
if [ -z ${REVISION} ]; then
REVISION="no rev"
fi
cat<<EOH>Environment.h
#import <Foundation/Foundation.h>
#define REVISION @"${REVISION}"
@interface Environment : NSObject @end
EOH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment