From 9d9c62fe4b6cfdaa0a22099817908e7e9eb0084b Mon Sep 17 00:00:00 2001 From: Matthias Frei Date: Thu, 14 Dec 2023 17:19:35 +0100 Subject: [PATCH] ci: use valid version number during CI build Just a "ci-fixed" will be invalid in the debian packages. --- .buildkite/hooks/pre-command | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 38f6307520..13ccb7e58a 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -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 "--" + # This will be shortened to "-modified-ci" + export GIT_VERSION=$(tools/git-version | sed 's/-.*/-modified-ci/') else echo "build --stamp" > $HOME/.bazelrc fi