summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-16 00:06:08 -0600
committerJeff Carr <[email protected]>2024-11-16 00:06:08 -0600
commitd8fa053319afbf288d37872fffa0e2cb8f2dd0ec (patch)
tree2aef9fd4ea8a5fca2353a62080d8952d59ffdcb5 /Makefile
parent82096a971e76befccc1fafe938513ac7c3c50baf (diff)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 19 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3d9bb77..6a82c73 100644
--- a/Makefile
+++ b/Makefile
@@ -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 .