Update Makefile to make use of -trimpath build option
This option makes go build/install removes the absolute paths within the produced executable, enabling more reproducible builds. See ¹ for more details. ¹: https://golang.org/doc/go1.13?ref=hvper.com#go-command
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
.PHONY: lint build test jaillover race coverage install acceptance deps docker
|
.PHONY: lint build test jaillover race coverage install acceptance deps docker
|
||||||
|
|
||||||
GOCMD=go
|
GOCMD=go
|
||||||
GOBUILD=$(GOCMD) build
|
GOBUILD=$(GOCMD) build -trimpath
|
||||||
|
GOINSTALL=$(GOCMD) install -trimpath
|
||||||
GOGET=$(GOCMD) get
|
GOGET=$(GOCMD) get
|
||||||
GOTEST=$(GOCMD) test
|
GOTEST=$(GOCMD) test
|
||||||
GOTOOL=$(GOCMD) tool
|
GOTOOL=$(GOCMD) tool
|
||||||
@@ -39,7 +40,7 @@ coverage: test race
|
|||||||
$(GOTOOL) cover -html=$(TMP_DIR)/c.out -o $(OUTPUT_DIR)/coverage.html
|
$(GOTOOL) cover -html=$(TMP_DIR)/c.out -o $(OUTPUT_DIR)/coverage.html
|
||||||
|
|
||||||
install: build
|
install: build
|
||||||
CGO_ENABLED=0 go install ./...
|
CGO_ENABLED=0 $(GOINSTALL) ./...
|
||||||
|
|
||||||
acceptance: install
|
acceptance: install
|
||||||
make -C ./spec/test
|
make -C ./spec/test
|
||||||
|
|||||||
Reference in New Issue
Block a user