2020-02-21 14:21:07 +00:00
|
|
|
GO ?= go
|
2020-09-12 19:53:28 +00:00
|
|
|
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
|
2020-02-21 14:21:07 +00:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2020-09-12 19:53:28 +00:00
|
|
|
$(GO) build -ldflags '-s -w -X "main.Version=$(VERSION)"'
|
2020-02-21 14:21:07 +00:00
|
|
|
|
|
|
|
.PHONY: fmt
|
|
|
|
fmt:
|
|
|
|
$(GO) fmt ./...
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
2020-09-12 19:53:28 +00:00
|
|
|
$(GO) test --race ./...
|
2020-02-21 14:21:07 +00:00
|
|
|
|
2020-09-12 19:53:28 +00:00
|
|
|
.PHONY: vet
|
|
|
|
vet:
|
|
|
|
$(GO) vet ./...
|