Makefile
raw| 1 | VERSION ?= dev |
| 2 | |
| 3 | .DEFAULT_GOAL := build |
| 4 | |
| 5 | test: |
| 6 | go fmt ./... |
| 7 | go vet ./... |
| 8 | go clean -testcache && go test -cover ./... |
| 9 | .PHONY:test |
| 10 | |
| 11 | build: test |
| 12 | go build -ldflags "-X main.Version=${VERSION}" -mod vendor |
| 13 | .PHONY:build |
| 14 | |
| 15 | install: test |
| 16 | go install -ldflags "-X main.Version=${VERSION}" -mod vendor |
| 17 | .PHONY:install |