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:
pancho horrillo
2019-11-20 06:43:40 +01:00
parent 75b0908b16
commit d81ef278da
+3 -2
View File
@@ -1,7 +1,8 @@
.PHONY: lint build test jaillover race coverage install acceptance deps docker
GOCMD=go
GOBUILD=$(GOCMD) build
GOBUILD=$(GOCMD) build -trimpath
GOINSTALL=$(GOCMD) install -trimpath
GOGET=$(GOCMD) get
GOTEST=$(GOCMD) test
GOTOOL=$(GOCMD) tool
@@ -39,7 +40,7 @@ coverage: test race
$(GOTOOL) cover -html=$(TMP_DIR)/c.out -o $(OUTPUT_DIR)/coverage.html
install: build
CGO_ENABLED=0 go install ./...
CGO_ENABLED=0 $(GOINSTALL) ./...
acceptance: install
make -C ./spec/test