From a2f79e539d3bb5a6a95eaa232680fe78c5ceb836 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 2 Nov 2021 23:02:35 -0500 Subject: [PATCH] Update repo Signed-off-by: jolheiser --- README.md | 2 +- template.toml | 1 + template/Makefile | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c65272..e4224b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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 diff --git a/template.toml b/template.toml index 658073d..c1babb7 100644 --- a/template.toml +++ b/template.toml @@ -1 +1,2 @@ go_mod = "gitea.com/user/repo" +binary = false \ No newline at end of file diff --git a/template/Makefile b/template/Makefile index b786d42..2dde24e 100644 --- a/template/Makefile +++ b/template/Makefile @@ -1,10 +1,11 @@ +{{if binary}} 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)"' - +{{end}} .PHONY: vet vet: $(GO) vet ./...