Skip to content

Commit

Permalink
Merge pull request #261 from sandstorm-io/set-release-script-version
Browse files Browse the repository at this point in the history
Set release.sh to version 1.0 manually
  • Loading branch information
ocdtrekkie authored Feb 14, 2020
2 parents a76cf3d + 0892d84 commit 8830122
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,10 @@ function assert_git_state_is_clean() {
}

function get_release_name() {
# We use the current Sandstorm release number as vagrant-spk release number for simplicity. This
# does mean it might be hard to hae two vagrant-spk releases in a short time period.
#
# As for what these version numbers *mean* and how this gets calculated, see the sandstorm
# repository's release.sh.
local CHANNEL=dev
# DISPLAY_VERSION gets used in the git tag description
DISPLAY_VERSION='1.0'

echo "**** Determining next build number for $CHANNEL channel ****"

local LAST_BUILD=$(curl -fs https://install.sandstorm.io/$CHANNEL)

# Import the BRANCH_NUMBER from the sandstorm git repo.
. ../sandstorm/branch.conf

if (( LAST_BUILD / 1000 > BRANCH_NUMBER )); then
echo "ERROR: $CHANNEL has already moved past this branch!" >&2
echo " I refuse to replace it with an older branch." >&2
exit 1
fi

local BASE_BUILD=$(( BRANCH_NUMBER * 1000 ))
local BUILD=$(( BASE_BUILD > LAST_BUILD ? BASE_BUILD : LAST_BUILD ))
local BUILD_MINOR="$(( $BUILD % 1000 ))"

# DISPLAY_VERSION gets used in the git tag description, so we make it global.
DISPLAY_VERSION="${BRANCH_NUMBER}.${BUILD_MINOR}"

# TAG_NAME gets used as the git tag name, so we make it global.
# TAG_NAME gets used as the git tag name
TAG_NAME="v${DISPLAY_VERSION}"
}

Expand Down

0 comments on commit 8830122

Please sign in to comment.