Last active
January 13, 2016 16:26
-
-
Save ryanmasondavies/ff3c8e891a93e4ad249e to your computer and use it in GitHub Desktop.
Update build number from Subversion
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
# Needs to be placed after the usual versioning script in the WatchKit extension to copy the extension’s build number over to the app. | |
extension_plist="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" | |
extension_build_path="${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}" | |
app_name=`cd "$extension_build_path"; ls -d *app` | |
app_plist="${TARGET_BUILD_DIR}/${FULL_PRODUCT_NAME}/$app_name/Info.plist" | |
extension_build_number=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$extension_plist") | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $extension_build_number" "$app_plist" |
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
#!/bin/bash | |
echo -n ${PROJECT_DIR}/${INFOPLIST_PATH} \ | |
| xargs -0 /usr/libexec/PlistBuddy -c "Set :CFBundleVersion `svnversion -n`" |
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
#!/bin/bash | |
echo -n ${TARGET_BUILD_DIR}/${INFOPLIST_PATH} \ | |
| xargs -0 /usr/libexec/PlistBuddy -c "Set :CFBundleVersion `svnversion -n`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment