2020-11-17 05:41:34 +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.jolheiser.com/tmpl/cmd.Version=$(VERSION)"'
|
|
|
|
|
|
|
|
.PHONY: vet
|
|
|
|
vet:
|
|
|
|
$(GO) vet ./...
|
|
|
|
|
|
|
|
.PHONY: fmt
|
|
|
|
fmt:
|
|
|
|
$(GO) fmt ./...
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
$(GO) test -race ./...
|
2020-11-17 05:43:07 +00:00
|
|
|
|
2020-11-28 23:07:18 +00:00
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
|
|
|
earth +lint
|
|
|
|
|
2020-11-17 05:43:07 +00:00
|
|
|
.PHONY: docs
|
|
|
|
docs:
|
|
|
|
$(GO) run docs.go
|