2021-11-03 04:02:35 +00:00
|
|
|
{{if binary}}
|
2020-11-18 17:29:21 +00:00
|
|
|
GO ?= go
|
|
|
|
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
$(GO) build -ldflags '-s -w -X "{{go_mod}}/cmd.Version=$(VERSION)"'
|
2021-11-03 04:02:35 +00:00
|
|
|
{{end}}
|
2020-11-18 17:29:21 +00:00
|
|
|
.PHONY: vet
|
|
|
|
vet:
|
|
|
|
$(GO) vet ./...
|
|
|
|
|
|
|
|
.PHONY: fmt
|
|
|
|
fmt:
|
|
|
|
$(GO) fmt ./...
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
$(GO) test -race ./...
|