diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,5 @@ +.PHONY: build + VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d_%H%M) @@ -5,11 +7,17 @@ BUILDTIME = $(shell date +%Y.%m.%d_%H%M) # REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi) REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi) -all: +all: build + ./zood --version + ./zood + +build: GO111MODULE=off go build \ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" - #./zood - ./zood --version + +install: + GO111MODULE=off go install \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" # this is for release builds using the go.mod files release-build: |
