Skip to content

Commit b98cf33

Browse files
Merge pull request #74 from DataDog/fix/version-ldflags
fix(version): correct ldflags variable names for build metadata
2 parents 74fcbbb + 2f2ed75 commit b98cf33

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

.goreleaser.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ builds:
3333
ldflags:
3434
- -s -w
3535
- -X github.com/DataDog/pup/internal/version.Version={{.Version}}
36-
- -X github.com/DataDog/pup/internal/version.Commit={{.Commit}}
37-
- -X github.com/DataDog/pup/internal/version.Date={{.Date}}
38-
- -X github.com/DataDog/pup/internal/version.BuiltBy=goreleaser
36+
- -X github.com/DataDog/pup/internal/version.GitCommit={{.Commit}}
37+
- -X github.com/DataDog/pup/internal/version.BuildDate={{.Date}}
3938

4039
archives:
4140
- id: pup

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
1717
# Build flags
1818
LDFLAGS := -s -w \
1919
-X github.com/DataDog/pup/internal/version.Version=$(VERSION) \
20-
-X github.com/DataDog/pup/internal/version.Commit=$(COMMIT) \
21-
-X github.com/DataDog/pup/internal/version.Date=$(DATE) \
22-
-X github.com/DataDog/pup/internal/version.BuiltBy=makefile
20+
-X github.com/DataDog/pup/internal/version.GitCommit=$(COMMIT) \
21+
-X github.com/DataDog/pup/internal/version.BuildDate=$(DATE)
2322

2423
# Go build flags
2524
GO_BUILD_FLAGS := -trimpath -ldflags "$(LDFLAGS)"

0 commit comments

Comments
 (0)