Skip to content

Instantly share code, notes, and snippets.

@tokorom
Created May 15, 2014 09:27
Show Gist options
  • Save tokorom/c4ab0a124c48d4150ed8 to your computer and use it in GitHub Desktop.
Save tokorom/c4ab0a124c48d4150ed8 to your computer and use it in GitHub Desktop.
marketVersion=`xcrun agvtool what-marketing-version | grep "^Found " | head -1 | gsed -e "s/.*\"\([.0-9]\+\)\".*/\1/"`
if [ ${CONFIGURATION} = "Release" ]; then
versionString="\"$marketVersion\""
else
lastCommitDate=`xcrun git log -1 --format='%ci'`
versionString="\"$marketVersion ($lastCommitDate)\""
fi
xcrun agvtool new-version "$versionString"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment