File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 22
33set -eux
44
5- #! /bin/bash
6-
7- set -eu
8-
95git fetch --tags --force
106
117PREV_TAG=` git describe --tags --abbrev=0`
12- REV_COUNT=" "
138VERSION=" "
149
1510# when executing this script with a git tag defined by buildkite, we are releasing to production
1611if [[ ${BUILDKITE_TAG:- " " } != " " ]]; then
1712 VERSION=" $BUILDKITE_TAG "
1813# when executing this script on the master branch, we are releasing internal versions
19- elif [[ ${BUILDKITE_BRANCH:- } ! = " master" ]]; then
14+ elif [[ ${BUILDKITE_BRANCH:- } = = " master" ]]; then
2015 VERSION=${PREV_TAG}
2116
2217 # if there are multiple revisions, append that revision number
2318 _REV_COUNT=$( git rev-list " ${PREV_TAG} " ..HEAD --count 2> /dev/null) || true
2419 if [[ ! -z " ${_REV_COUNT:- } " ]]; then
25- REV_COUNT=${_REV_COUNT}
26- fi
27-
28- if [[ ${REV_COUNT} != " " ]]; then
29- VERSION=" ${PREV_TAG} +internal.${REV_COUNT} "
20+ VERSION=" ${PREV_TAG} +internal.${_REV_COUNT} "
3021 fi
3122fi
3223
You can’t perform that action at this time.
0 commit comments