fix makefile

This commit is contained in:
Jeff Carr 2024-11-16 00:06:08 -06:00
parent 82096a971e
commit d8fa053319
2 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,24 @@
run: build
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./control-panel-cloudflare
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-cloudflare
goimports:
goimports -w *.go
@ -18,9 +36,6 @@ build-and-update:
goget:
go get -v -x .
build:
go build -v -o control-panel-cloudflare
update:
GO111MODULE="off" go get -v -u -x .

View File

@ -13,9 +13,6 @@ var myGui *gui.Node
// var cloudflareURL string = "https://api.cloudflare.com/client/v4/zones/"
func main() {
// send all log() output to a file in /tmp
// log.SetTmp()
// parse the config file
readConfig()