2019-01-23 01:24:59 +00:00
|
|
|
export GOOS=windows
|
|
|
|
|
2020-12-01 11:06:46 +00:00
|
|
|
.PHONY: build
|
|
|
|
build: windows_exporter.exe
|
|
|
|
windows_exporter.exe: **/*.go
|
2017-09-08 08:11:31 +00:00
|
|
|
promu build -v
|
2019-01-23 01:24:59 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
go test -v ./...
|
|
|
|
|
2018-10-02 07:25:01 +00:00
|
|
|
lint:
|
2019-10-19 14:50:13 +00:00
|
|
|
golangci-lint -c .golangci.yaml run
|
2018-10-02 07:25:01 +00:00
|
|
|
|
2020-11-30 09:31:37 +00:00
|
|
|
.PHONY: e2e-test
|
2020-12-01 11:06:46 +00:00
|
|
|
e2e-test: windows_exporter.exe
|
2020-11-30 09:31:37 +00:00
|
|
|
powershell -NonInteractive -ExecutionPolicy Bypass -File .\tools\end-to-end-test.ps1
|
|
|
|
|
2018-10-02 07:25:01 +00:00
|
|
|
fmt:
|
|
|
|
gofmt -l -w -s .
|
|
|
|
|
2019-01-23 01:24:59 +00:00
|
|
|
crossbuild:
|
|
|
|
# The prometheus/golang-builder image for promu crossbuild doesn't exist
|
|
|
|
# on Windows, so for now, we'll just build twice
|
|
|
|
GOARCH=amd64 promu build --prefix=output/amd64
|
|
|
|
GOARCH=386 promu build --prefix=output/386
|