Skip to content

Commit

Permalink
use -buildvcs=false
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspin committed Oct 13, 2023
1 parent f93034b commit 5ce9a8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ builds:
- id: non-windows-build
env:
- CGO_ENABLED=0
- GOFLAGS=-buildvcs=false
goos:
- linux
- darwin
Expand All @@ -19,6 +20,7 @@ builds:
- id: windows-build
env:
- CGO_ENABLED=0
- GOFLAGS=-buildvcs=false
ldflags:
- -s -w -X main.VERSION={{.Tag}}
goos:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ go.fmt:
test:
docker-compose run --rm cli gotestsum --format short-verbose --junitfile junit-report.xml --packages="./..." -- -p 1

# Go 1.20 changed the handling of git worktrees,
# so we need to pass buildvcs=false, for now.
# See: https://github.com/golang/go/issues/59068
build:
docker-compose run --rm cli env GOOS=$(OS) GOARCH=$(ARCH) go build -o artifact
docker-compose run --rm cli env GOFLAGS=-buildvcs=false GOOS=$(OS) GOARCH=$(ARCH) go build -o artifact

0 comments on commit 5ce9a8e

Please sign in to comment.