From b1de98a8f80b2a8aabce3cd70ab1d9b3fbe7817a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 16 Nov 2024 00:06:47 -0600 Subject: [PATCH] fix build --- Makefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cf71e66..e6a448a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,24 @@ -all: - go build -v -x +VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d) + +all: build ./control-panel-vpn +build: + GO111MODULE=off go build \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +verbose: + GO111MODULE=off go build -v -x \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +install: + GO111MODULE=off go install \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +clean: + -rm -f control-panel-vpn + goimports: goimports -w *.go