Created
December 4, 2015 14:41
-
-
Save viktorbenei/13712ccd5752b4cfa772 to your computer and use it in GitHub Desktop.
Offset the Bitrise.io $BITRISE_BUILD_NUMBER
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
#!/bin/bash | |
set -e | |
if [ -z "$BITRISE_BUILD_NUMBER" ] ; then | |
echo " [!] BITRISE_BUILD_NUMBER not provided" | |
exit 1 | |
fi | |
echo "=> Original BITRISE_BUILD_NUMBER: $BITRISE_BUILD_NUMBER" | |
set -x | |
build_number_offset=23 | |
new_build_num=$(($BITRISE_BUILD_NUMBER + $build_number_offset)) | |
envman add --key BITRISE_BUILD_NUMBER --value $new_build_num |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(by override I mean set it outright without the ability to decrement it, saves this step)