Last active
September 28, 2018 00:04
-
-
Save kardolus/35036edb53197ed569348eab09018fea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if [ "$#" -ne 2 ]; then | |
| echo "Usage: bump_version <version_number> <message>" | |
| exit 1 | |
| fi | |
| VERSION=$1 | |
| MESSAGE=$2 | |
| # Update package.json | |
| sed -i '' "s/\"version\": \"[[:digit:]]*.[[:digit:]]*.[[:digit:]]*\"/\"version\": \"${VERSION}\"/g" package.json | |
| # Update XCode version and build | |
| sed -i '' "/<key>CFBundleShortVersionString<\/key>/,/<key>CFBundleSignature<\/key>/s/<string>[[:digit:]]*.[[:digit:]]*.[[:digit:]]*<\/string>/<string>${VERSION}<\/string>/g" ios/verne/Info.plist | |
| sed -i '' "/<key>CFBundleVersion<\/key>/,/<key>LSRequiresIPhoneOS<\/key>/s/<string>[[:digit:]]*<\/string>/<string>1<\/string>/g" ios/verne/Info.plist | |
| # Push App to TestFlight | |
| pushd ios | |
| fastlane beta | |
| popd | |
| # Commit to git | |
| git add . | |
| git commit -m "Bump Verne Version" | |
| git push | |
| # Create git tag | |
| git tag -a v$VERSION -m "${MESSAGE}" | |
| git push origin v$VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment