Files
wesher/Makefile
Leo Antunes 74b37a3945 Makefile: remove go BuildID
The GOROOT is used to calculate the buildID, which may change depending
on OS/environment/etc. Removing it, together with -trimpath, should make
the build fully reproducible.
2019-11-26 21:15:23 +01:00

22 lines
489 B
Makefile

export CGO_ENABLED=0
VERSION := $(shell git describe --tags --dirty --always)
GOFLAGS := -ldflags "-X main.version=$(VERSION) -buildid=" -trimpath
GOARCHES := $(shell go env GOARCH)
build:
$(foreach GOARCH,$(GOARCHES),GOARCH=$(GOARCH) go build ${GOFLAGS} -o wesher$(if $(filter-out $(GOARCH), $(GOARCHES)),-$(GOARCH));)
release: build
sha256sum wesher-* > wesher.sha256sums
e2e: build
tests/e2e.sh
clean:
rm -f wesher wesher-* wesher.sha256sums
.PHONY: build release e2e clean