Skip to content

Instantly share code, notes, and snippets.

@kim4apple
Forked from jvanmetre/GenGitVersion.sh
Created October 8, 2013 01:49
Show Gist options
  • Save kim4apple/6878150 to your computer and use it in GitHub Desktop.
Save kim4apple/6878150 to your computer and use it in GitHub Desktop.
git=/usr/local/git/bin/git
touch Info.plist
version=`$git describe --dirty`
version=`echo $version | sed 's/[a-zA-Z]*//'`
versionNum=`echo $version | sed 's/\-[0-9]*\-[a-zA-Z0-9]*//'`
echo "#define GIT_VERSION $version" > InfoPlist.h
echo "#define APP_VERSION $versionNum" >> InfoPlist.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment