Skip to content

Instantly share code, notes, and snippets.

@HackingGate
Created August 24, 2015 02:14
Show Gist options
  • Save HackingGate/945c53824f6b8f441868 to your computer and use it in GitHub Desktop.
Save HackingGate/945c53824f6b8f441868 to your computer and use it in GitHub Desktop.
Insert Subversion revision number in Xcode
REV_GIT=`git svn info |grep Revision: |cut -c11-`
REV_SVN=`svn info |grep Revision: |cut -c11-`
if [ -z $REV_GIT ] ;then
REV=$REV_SVN
else
REV=$REV_GIT
fi
echo "REV is $REV"
BASEVERNUM=`/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${INFOPLIST_FILE}"`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $REV" "${INFOPLIST_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment