tmpls/template/Makefile
jolheiser 699ee74114
Initial Makefile
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-11-18 11:29:21 -06:00

19 lines
293 B
Makefile

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)"'
.PHONY: vet
vet:
$(GO) vet ./...
.PHONY: fmt
fmt:
$(GO) fmt ./...
.PHONY: test
test:
$(GO) test -race ./...