Skip to content

Commit

Permalink
Use go -trimpath
Browse files Browse the repository at this point in the history
per golang/go#63851 this is the recommended way
to achieve reproducible builds.

This patch was done while working on reproducible builds for openSUSE.
  • Loading branch information
bmwiedemann committed Nov 11, 2023
1 parent 5c547ed commit 64805c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export GO111MODULE=on
unexport GOPATH

export LDFLAGS := -extldflags '$(LDFLAGS)'
export GCFLAGS := all=-trimpath '$(PWD)'
export ASMFLAGS := all=-trimpath '$(PWD)'
export GCFLAGS :=
export ASMFLAGS :=

MIN_COVERAGE = 90.2

Expand Down
1 change: 1 addition & 0 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ build_hub() {
-ldflags "-X github.com/github/hub/v2/version.Version=`./script/version` $LDFLAGS" \
-gcflags "$GCFLAGS" \
-asmflags "$ASMFLAGS" \
-trimpath \
-o "$1"
}

Expand Down

0 comments on commit 64805c5

Please sign in to comment.