Created
March 30, 2012 08:26
-
-
Save mazgi/2249596 to your computer and use it in GitHub Desktop.
Xcodeでビルド時のリビジョン取得するのにこーゆースクリプトを登録してる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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