Skip to content

Commit 26b9e2a

Browse files
committed
fix review comments
remove REV_COUNT print commands
1 parent d5e5ee1 commit 26b9e2a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

scripts/update-version.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,22 @@
22

33
set -eux
44

5-
#!/bin/bash
6-
7-
set -eu
8-
95
git fetch --tags --force
106

117
PREV_TAG=`git describe --tags --abbrev=0`
12-
REV_COUNT=""
138
VERSION=""
149

1510
# when executing this script with a git tag defined by buildkite, we are releasing to production
1611
if [[ ${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
3122
fi
3223

0 commit comments

Comments
 (0)