55 lines
1.1 KiB
Makefile
55 lines
1.1 KiB
Makefile
.PHONY: build
|
|
|
|
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
|
|
|
all: proto install
|
|
@#./gus --config /etc/gus/gus.text
|
|
gus --me
|
|
|
|
gocui: build
|
|
./gus --gui gocui --config /etc/gus/gus.text >/tmp/gocui.log 2>&1
|
|
|
|
build: goimports vet
|
|
GO111MODULE=off go build -v -x \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
install: goimports vet
|
|
GO111MODULE=off go install -v -x \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
sudo: build
|
|
sudo ./gus
|
|
|
|
# makes a .deb package
|
|
debian:
|
|
go-deb --repo go.wit.com/lib/daemons/gus
|
|
|
|
daemon:
|
|
./gus --daemon --no-gui --config /etc/gus/gus.text
|
|
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
vet:
|
|
@GO111MODULE=off go vet
|
|
@echo this go binary package builds okay
|
|
|
|
clean:
|
|
rm -f go.* *.pb.go
|
|
rm -f gus
|
|
|
|
proto: portmap.pb.go event.pb.go
|
|
|
|
portmap.pb.go: portmap.proto
|
|
autogenpb --proto portmap.proto
|
|
|
|
event.pb.go: event.proto
|
|
autogenpb --proto event.proto
|
|
|
|
list:
|
|
curl "http://localhost:2522/list"
|
|
|
|
save:
|
|
curl "http://localhost:2522/save"
|