2024-10-08 11:36:46 -05:00
|
|
|
VERSION = $(shell git describe --tags)
|
|
|
|
|
2024-01-12 04:14:09 -06:00
|
|
|
all:
|
2024-10-08 11:23:44 -05:00
|
|
|
@echo "make run # will build and run the daemon here"
|
|
|
|
@echo "make debian # will build a debian package"
|
|
|
|
@echo "make restart # restart the daemon"
|
|
|
|
@echo "make enable # enable daemon on boot"
|
|
|
|
@echo "make log # watch the daemon log"
|
2024-10-06 22:01:18 -05:00
|
|
|
|
2024-10-08 10:53:57 -05:00
|
|
|
log:
|
|
|
|
@#systemctl status gowebd.service
|
|
|
|
@journalctl -f -xeu gowebd.service
|
|
|
|
|
2024-10-08 11:17:37 -05:00
|
|
|
enable:
|
2024-10-08 11:32:37 -05:00
|
|
|
systemctl enable gowebd.service
|
2024-10-08 11:17:37 -05:00
|
|
|
|
2024-10-08 11:30:31 -05:00
|
|
|
restart:
|
2024-10-08 11:32:37 -05:00
|
|
|
systemctl stop gowebd.service
|
|
|
|
systemctl start gowebd.service
|
2024-10-08 10:53:57 -05:00
|
|
|
|
2024-10-06 22:01:18 -05:00
|
|
|
run:
|
2024-02-10 07:34:58 -06:00
|
|
|
git pull
|
2024-01-12 04:14:09 -06:00
|
|
|
echo "build it!"
|
2024-10-08 11:36:46 -05:00
|
|
|
GO111MODULE=off go build -v -x -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
./gowebd --port 2233
|
|
|
|
# setcap 'cap_net_bind_service=+ep' gowebd # allow the binary to open ports below 1024
|
2024-01-12 04:14:09 -06:00
|
|
|
|
2024-01-31 08:45:58 -06:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
2024-01-12 04:14:09 -06:00
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|
2024-10-08 11:36:46 -05:00
|
|
|
clean:
|
|
|
|
rm -f go.*
|
|
|
|
rm -f go.wit.com
|
|
|
|
rm -f gowebd
|
|
|
|
|
2024-10-06 22:01:18 -05:00
|
|
|
# makes a .deb package
|
|
|
|
debian:
|
2024-10-08 11:36:46 -05:00
|
|
|
go-deb --no-gui --repo go.wit.com/apps/gowebd
|