Skip to content

Instantly share code, notes, and snippets.

@c99koder
Created May 5, 2016 22:34
Show Gist options
  • Save c99koder/25293cf7b1e9b00261c77bb1d8d1565e to your computer and use it in GitHub Desktop.
Save c99koder/25293cf7b1e9b00261c77bb1d8d1565e to your computer and use it in GitHub Desktop.
if [ $CONFIGURATION == "AppStore" ]; then
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $PROJECT_DIR/IRCCloud/IRCCloud-Info.plist)
else
bN=$(/usr/bin/git rev-parse --short HEAD)
fi
echo -n "#define GIT_VERSION " > $PROJECT_DIR/IRCCloud/InfoPlist.h
echo $bN >> $PROJECT_DIR/IRCCloud/InfoPlist.h
touch $PROJECT_DIR/IRCCloud/IRCCloud-Info.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment