Skip to content

Commit

Permalink
backport of commit fd26fd5 (#20521)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Swenson <christopher.swenson@hashicorp.com>
  • Loading branch information
hc-github-team-secure-vault-core and Christopher Swenson authored May 4, 2023
1 parent ca6f644 commit c33ebe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog/20519.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
Add debug symbols back to builds to fix Dynatrace support
```
7 changes: 3 additions & 4 deletions scripts/ci-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,16 @@ function build() {
prerelease=$(version_pre)
build_date=$(build_date)
: "${GO_TAGS:=""}"
: "${KEEP_SYMBOLS:=""}"
: "${REMOVE_SYMBOLS:=""}"

# Build our ldflags
msg="--> Building Vault v$version, revision $revision, built $build_date"

# Keep the symbol and dwarf information by default
# TODO: maybe add REMOVE_SYMBOLS?
if [ -n "$KEEP_SYMBOLS" ]; then
if [ -n "$REMOVE_SYMBOLS" ]; then
ldflags="-s -w "
else
ldflags="-s -w "
ldflags=""
fi

ldflags="${ldflags}-X github.com/hashicorp/vault/version.Version=$version -X github.com/hashicorp/vault/version.GitCommit=$revision -X github.com/hashicorp/vault/version.BuildDate=$build_date"
Expand Down

0 comments on commit c33ebe9

Please sign in to comment.