From 6cd369f4689312e08ca294586b2934e62ac3b7aa Mon Sep 17 00:00:00 2001 From: Steven Clark Date: Wed, 11 Jun 2025 15:58:16 -0400 Subject: [PATCH] Add buildvcs=false to revert to older behavior of not embedding VCS info into Vault binary (#30926) * Add buildvcs=false to revert to older behavior of not embedding VCS info into Vault binary * Add cl --- changelog/30926.txt | 3 +++ scripts/ci-helper.sh | 2 +- scripts/windows/build.bat | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/30926.txt diff --git a/changelog/30926.txt b/changelog/30926.txt new file mode 100644 index 0000000000..7bc93c8cae --- /dev/null +++ b/changelog/30926.txt @@ -0,0 +1,3 @@ +```release-note:bug +core: Omit automatic version control information of the main module from compiled Vault binaries +``` diff --git a/scripts/ci-helper.sh b/scripts/ci-helper.sh index e105a97f4f..a267700886 100755 --- a/scripts/ci-helper.sh +++ b/scripts/ci-helper.sh @@ -124,7 +124,7 @@ function build() { mkdir -p out set -x go env - go build -v -tags "$GO_TAGS" -ldflags "$ldflags" -o dist/ + go build -v -buildvcs=false -tags "$GO_TAGS" -ldflags "$ldflags" -o dist/ set +x popd } diff --git a/scripts/windows/build.bat b/scripts/windows/build.bat index 79e27605a7..e4928e7b4e 100644 --- a/scripts/windows/build.bat +++ b/scripts/windows/build.bat @@ -63,7 +63,7 @@ del /f "%_GO_ENV_TMP_FILE%" 2>nul REM Build! echo ==^> Building... go build^ - -ldflags "-X github.com/hashicorp/vault/version.GitCommit=%_GIT_COMMIT%%_GIT_DIRTY% -X github.com/hashicorp/vault/version.BuildDate=%_BUILD_DATE%"^ + -buildvcs=false -ldflags "-X github.com/hashicorp/vault/version.GitCommit=%_GIT_COMMIT%%_GIT_DIRTY% -X github.com/hashicorp/vault/version.BuildDate=%_BUILD_DATE%"^ -o "bin/vault.exe"^ .