summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 11377ae..6a6d340 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,8 @@
+.PHONY: build
+
+VERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%s)
+
all: portmap.pb.go goimports vet
@echo This GO code passes the compile checks
@@ -17,15 +22,15 @@ gocui: build
build: goimports vet
GO111MODULE=off go build -v -x \
- -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
install: goimports vet
GO111MODULE=off go install \
- -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
install-verbose: goimports vet
GO111MODULE=off go install -v -x \
- -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
goimports:
goimports -w *.go