summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 14 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 86fd2a0..2c7603a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
.PHONY: build
VERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%Y.%m.%d)
-all:
+all: build
@echo "make build # build"
@echo "make clean # clean build files"
@echo "make run # build and run on port 2233"
@@ -12,6 +13,18 @@ all:
@echo "make enable # enable daemon on boot"
@echo "make log # watch the daemon log"
+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}"
+
log:
@#systemctl status gowebd.service
@journalctl -f -xeu gowebd.service
@@ -29,11 +42,6 @@ start:
stop:
systemctl stop gowebd.service
-build:
- echo "build it!"
- # 2024/11/06 14:41:29 path = /home/jcarr/go/src/go.wit.com/apps/gowebd cmd = go build -v -x -ldflags -X main.VERSION=0.22.2-3-g28e0f09-dirty -ldflags -X main.GUIVERSION=0.22.2-3-g28e0f09-dirty
- GO111MODULE=off go build -v -x -ldflags "-X main.VERSION=${VERSION} -X gui.GUIVERSION=${VERSION}"
-
run: build
./gowebd --port 2233
# setcap 'cap_net_bind_service=+ep' gowebd # allow the binary to open ports below 1024