Last active
August 25, 2018 22:52
-
-
Save bwoods/55bed61e2da4b857f04350c9559bbf19 to your computer and use it in GitHub Desktop.
Xcode build step placing the git hash in the Settings.bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TestFlight has… opinions… about the CFBundleShortVersionString, so this is removed | |
#defaults write ${CODESIGNING_FOLDER_PATH}/Info CFBundleShortVersionString `git describe --dirty=+ --tags --always` | |
# add the version info to the Settings.bundle | |
GitVersion=$(git describe --dirty=+ --tags --always) | |
CFBundleShortVersionString=$(defaults read ${CODESIGNING_FOLDER_PATH}/Info CFBundleShortVersionString) | |
plutil -insert PreferenceSpecifiers.0 -xml "<dict><key>DefaultValue</key><string>${CFBundleShortVersionString} (${GitVersion})</string><key>Key</key><string>Version</string><key>Title</key><string>Version</string><key>Type</key><string>PSTitleValueSpecifier</string></dict>" ${CODESIGNING_FOLDER_PATH}/Settings.bundle/Root.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment