Instantly share code, notes, and snippets.

Embed
What would you like to do?
INFO=$( echo $TARGET_BUILD_DIR )/$( echo $INFOPLIST_PATH | sed -e 's/\.plist$//' )
echo $INFO
TAG=
COMMIT=
CURRENT=
CURRENT_BUILD=
GITPATH=/usr/bin:/usr/local/bin:/usr/local/git/bin
PATH=$PATH:$GITPATH; export PATH
if [ -z $( which git ) ]; then
echo "Unable to find git binary in \$GITPATH"
exit 1
fi
SHORT_VERSION=$( git describe --tags )
VERSION=$( echo $SHORT_VERSION | sed -e 's/^v//' | sed -e 's/-/./' | sed -e 's/-.*//' )
echo $VERSION
defaults write "$INFO" CFBundleShortVersionString $SHORT_VERSION
defaults write "$INFO" CFBundleVersion $VERSION
chmod 644 "$INFO.plist"
@incanus

This comment has been minimized.

Show comment
Hide comment
@incanus

incanus Oct 25, 2013

This writes to the build app (OS X) bundle with some Git info as to the build number. Could be adapted for other uses / iOS use, I'll wager.

Owner

incanus commented Oct 25, 2013

This writes to the build app (OS X) bundle with some Git info as to the build number. Could be adapted for other uses / iOS use, I'll wager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment