Skip to content

Commit

Permalink
ci: use valid version number during CI build
Browse files Browse the repository at this point in the history
Just a "ci-fixed" will be invalid in the debian packages.
  • Loading branch information
matzf committed Dec 14, 2023
1 parent 4f01e55 commit 9d9c62f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ rm -f $HOME/.bazelrc
# --nostamp is required for better caching (only on non-release jobs).
if [ "$BUILDKITE_PIPELINE_SLUG" == "scion" ]; then
echo "build --nostamp" > $HOME/.bazelrc
# Also set a fixed GIT_VERSION so that the workspace_status_command always
# returns the same value on CI to improve cache reuse.
export GIT_VERSION="ci-fixed"
# Shorten the git version to omit commit information, improving cache reuse.
# The format of git-version is "<tag>-<number-of-commits-since-the-tag>-<commit-short-hash>"
# This will be shortened to "<tag>-modified-ci"
export GIT_VERSION=$(tools/git-version | sed 's/-.*/-modified-ci/')
else
echo "build --stamp" > $HOME/.bazelrc
fi
Expand Down

0 comments on commit 9d9c62f

Please sign in to comment.