Skip to content

Instantly share code, notes, and snippets.

@viktorbenei
Created December 4, 2015 14:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save viktorbenei/13712ccd5752b4cfa772 to your computer and use it in GitHub Desktop.
Save viktorbenei/13712ccd5752b4cfa772 to your computer and use it in GitHub Desktop.
Offset the Bitrise.io $BITRISE_BUILD_NUMBER
#!/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
@jpike88
Copy link

jpike88 commented Sep 15, 2016

(by override I mean set it outright without the ability to decrement it, saves this step)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment