Skip to content

Commit 17d47a0

Browse files
committed
hack/build-go: Use OS_GIT_VERSION if available
This would update the build script, so that OCP could be built using a custom semver string from OS_GIT_VERSION instead of `git describe` output
1 parent 2c4931d commit 17d47a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hack/build-go.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ GOARCH=${GOACH:-${GOHOSTARCH}}
1414
# Go to the root of the repo
1515
cd "$(git rev-parse --show-cdup)"
1616

17-
if [ -z ${VERSION_OVERRIDE+a} ]; then
17+
VERSION_OVERRIDE=${VERSION_OVERRIDE:-${OS_GIT_VERSION:-}}
18+
if [ -z "${VERSION_OVERRIDE:-}" ]; then
1819
echo "Using version from git..."
1920
VERSION_OVERRIDE=$(git describe --abbrev=8 --dirty --always)
2021
fi

0 commit comments

Comments
 (0)