From 747956547b9f78c1c11d7ed2d88d76edd2732bff Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 16 Nov 2024 00:06:35 -0600 Subject: [PATCH] fix build --- Makefile | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 9e0848d..fde876f 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,35 @@ -# export GO111MODULE="off" -run: build - reset - # ./control-panel-droplet --debugger +VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d) + +all: build ./control-panel-droplet +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-droplet + redomod: rm -f go.* GO111MODULE= go mod init GO111MODULE= go mod tidy -build-release: - GO111MODULE=off go get -v -u -x . - GO111MODULE=off go build -v - ./control-panel-droplet - -build: - GO111MODULE=off go get -v -x . - GO111MODULE=off go build -v - -update: - go get -v -u -x . - -log: - reset - tail -f /tmp/witgui.* /tmp/guilogfile - gocui: build - ./control-panel-droplet -gui gocui >/tmp/control-panel-droplet 2>&1 + ./control-panel-droplet -gui gocui quiet: - ./control-panel-droplet >/tmp/witgui.log.stderr 2>&1 + ./control-panel-droplet github: @echo "IPv6 only. Do not mirror on github"