Update repo
Signed-off-by: jolheiser <john.olheiser@gmail.com>
parent
699ee74114
commit
a2f79e539d
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
go_mod = "gitea.com/user/repo"
|
go_mod = "gitea.com/user/repo"
|
||||||
|
binary = false
|
|
@ -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 ./...
|
||||||
|
|
Loading…
Reference in New Issue