Skip to content

Commit

Permalink
feat: add bunch of ldflags for reproducibility
Browse files Browse the repository at this point in the history
Signed-off-by: Batuhan Apaydın <[email protected]>
  • Loading branch information
developer-guy committed Feb 11, 2022
1 parent 659b03f commit 58f435c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
BUILD_DATE ?= $(shell date $(DATE_FMT))
endif
PKG=github.com/hashicorp/vault-csi-provider/internal/version
LDFLAGS?="-X '$(PKG).BuildVersion=$(VERSION)' \
LDFLAGS?="-buildid= -s -w -X '$(PKG).BuildVersion=$(VERSION)' \
-X '$(PKG).BuildDate=$(BUILD_DATE)' \
-X '$(PKG).GoVersion=$(shell go version)'"
K8S_VERSION?=v1.22.2
Expand Down Expand Up @@ -41,6 +41,9 @@ lint:

build:
CGO_ENABLED=0 go build \
-trimpath \
-mod=readonly \
-modcacherw \
-ldflags $(LDFLAGS) \
-o dist/ \
.
Expand Down

0 comments on commit 58f435c

Please sign in to comment.