Make build idempotent

Only rebuild windows_exporter.exe on changes to any Go source files.

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy 2020-12-01 21:06:46 +10:00 committed by Ben Reedy
parent b300998b4b
commit c93b709f96

View File

@ -1,6 +1,8 @@
export GOOS=windows
build:
.PHONY: build
build: windows_exporter.exe
windows_exporter.exe: **/*.go
promu build -v
test:
@ -10,7 +12,7 @@ lint:
golangci-lint -c .golangci.yaml run
.PHONY: e2e-test
e2e-test: build
e2e-test: windows_exporter.exe
powershell -NonInteractive -ExecutionPolicy Bypass -File .\tools\end-to-end-test.ps1
fmt: