2024-11-06 14:50:43 -06:00
|
|
|
.PHONY: build
|
|
|
|
|
2024-10-08 11:36:46 -05:00
|
|
|
VERSION = $(shell git describe --tags)
|
|
|
|
|
2024-01-12 04:14:09 -06:00
|
|
|
all:
|
2024-11-06 14:50:43 -06:00
|
|
|
@echo "make build # build"
|
|
|
|
@echo "make clean # clean build files"
|
|
|
|
@echo "make run # build and run on port 2233"
|
2024-10-08 11:23:44 -05:00
|
|
|
@echo "make debian # will build a debian package"
|
2024-11-06 14:50:43 -06:00
|
|
|
@echo ""
|
2024-10-08 11:23:44 -05:00
|
|
|
@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-11-06 14:50:43 -06:00
|
|
|
start:
|
|
|
|
systemctl start gowebd.service
|
|
|
|
|
|
|
|
stop:
|
|
|
|
systemctl stop gowebd.service
|
|
|
|
|
|
|
|
build:
|
2024-01-12 04:14:09 -06:00
|
|
|
echo "build it!"
|
2024-11-06 14:50:43 -06:00
|
|
|
# 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
|
2024-10-08 11:36:46 -05:00
|
|
|
./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
|
2024-10-11 17:19:49 -05:00
|
|
|
|
|
|
|
squash-the-last-3-commits-together:
|
|
|
|
git rebase -i HEAD~3
|
|
|
|
git fsck
|
|
|
|
git prune
|