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
This commit is contained in:
Steven Clark 2025-06-11 15:58:16 -04:00 committed by GitHub
parent b54aba9fd8
commit 6cd369f468
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

3
changelog/30926.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
core: Omit automatic version control information of the main module from compiled Vault binaries
```

View file

@ -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
}

View file

@ -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"^
.