Skip to content

Commit

Permalink
Setting buildid is no longer necessary for reproducible builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Moss committed May 11, 2022
1 parent ded5312 commit d383797
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ builds:
- -trimpath

ldflags:
- -buildid=
- -X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version={{ .Version }}

archives:
Expand Down
2 changes: 1 addition & 1 deletion hack/build-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ go mod tidy

# makes builds reproducible
export CGO_ENABLED=0
LDFLAGS="-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$VERSION -buildid="
LDFLAGS="-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$VERSION"

./hack/build.sh $VERSION # Used to generate website/generated.go used by ytt website

Expand Down
2 changes: 1 addition & 1 deletion hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ VERSION="${1:-$LATEST_GIT_TAG}"

# makes builds reproducible
export CGO_ENABLED=0
LDFLAGS="-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$VERSION -buildid="
LDFLAGS="-X github.com/vmware-tanzu/carvel-ytt/pkg/version.Version=$VERSION"

rm -f website/generated.go

Expand Down
2 changes: 1 addition & 1 deletion hack/test-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# makes builds reproducible
$env:CGO_ENABLED = 0
$repro_flags = "-ldflags=-buildid= -trimpath"
$repro_flags = "-ldflags=-trimpath"

echo Formatting
go fmt ./cmd/... ./pkg/...
Expand Down

0 comments on commit d383797

Please sign in to comment.