Skip to content

Instantly share code, notes, and snippets.

@jvanmetre
Created March 23, 2011 20:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jvanmetre/883880 to your computer and use it in GitHub Desktop.
Save jvanmetre/883880 to your computer and use it in GitHub Desktop.
Script to generate the Variables needed for XCode Versioning with Git
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