Skip to content

Commit

Permalink
Fix passing of version in build (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaughan authored Mar 5, 2024
1 parent 7432b5c commit 66adc11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ builds:
flags:
- -trimpath
ldflags:
- -s -w -X main.Version={{.Version}}
- -s -w -X github.com/kgaughan/gcredstash/internal.Version={{.Version}}
mod_timestamp: "{{ .CommitTimestamp }}"
tags:
- netgo
Expand All @@ -28,7 +28,7 @@ brews:
ids:
- archives
homepage: "https://github.com/kgaughan/gcredstash"
tap:
repository:
owner: kgaughan
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ VERSION:=unknown
all: gcredstash

gcredstash:
CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -X main.Version=$(VERSION)" -tags netgo -o $@ ./cmd/$@
CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -X github.com/kgaughan/gcredstash/internal.Version=$(VERSION)" -tags netgo -o $@ ./cmd/$@

test:
go test -cover -v ./...
Expand Down

0 comments on commit 66adc11

Please sign in to comment.