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 ba78328
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 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?="-s -w -extldflags=-zrelro -extldflags=-znow -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,7 @@ lint:

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

0 comments on commit ba78328

Please sign in to comment.