Update repo

Signed-off-by: jolheiser <john.olheiser@gmail.com>
jolheiser 2021-11-02 23:02:35 -05:00
parent 699ee74114
commit a2f79e539d
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
3 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Makefile Template # Makefile Template
A basic Makefile template for [tmpl](https://gitea.com/jolheiser/tmpl) A basic Makefile template for [tmpl](https://git.jojodev.com/jolheiser/tmpl)
## License ## License

View File

@ -1 +1,2 @@
go_mod = "gitea.com/user/repo" go_mod = "gitea.com/user/repo"
binary = false

View File

@ -1,10 +1,11 @@
{{if binary}}
GO ?= go GO ?= go
VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//') VERSION ?= $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
.PHONY: build .PHONY: build
build: build:
$(GO) build -ldflags '-s -w -X "{{go_mod}}/cmd.Version=$(VERSION)"' $(GO) build -ldflags '-s -w -X "{{go_mod}}/cmd.Version=$(VERSION)"'
{{end}}
.PHONY: vet .PHONY: vet
vet: vet:
$(GO) vet ./... $(GO) vet ./...