diff --git a/Makefile b/Makefile index 7870f0d..8091f0b 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,37 @@ -NAME=sour.is-ipseity +NAME=sour.is-keyproofs BUMP?=current DATE:=$(shell date -u +%FT%TZ) HASH:=$(shell git rev-pars HEAD 2> /dev/null) VERSION:=$(shell BUMP=$(BUMP) ./version.sh) +build: $(NAME) + +clean: + rm -f $(NAME) + version: @echo $(VERSION) - tag: git tag -a v$(VERSION) -m "Version: $(VERSION)" release: @make tag BUMP=patch - run: go run -v \ -ldflags "\ -X main.AppVersion=$(VERSION) \ -X main.BuildHash=$(HASH) \ - -X main.BuildDate=$(DATE) \ - " \ - . + -X main.BuildDate=$(DATE)" . -build: +$(NAME): go build -v \ + -o $(NAME) \ -ldflags "\ -X main.AppVersion=$(VERSION) \ -X main.BuildHash=$(HASH) \ - -X main.BuildDate=$(DATE) \ - " \ - . + -X main.BuildDate=$(DATE)" . -install: build - install ./keyproofs /usr/local/bin - install ./sour.is-keyproofs.service /lib/systemd/system \ No newline at end of file +install: $(NAME) + install ./$(NAME) /usr/local/bin + install ./$(NAME).service /lib/systemd/system + systemctl daemon-reload diff --git a/pkg/keyproofs/template.go b/pkg/keyproofs/template.go index 171531d..f5f4953 100644 --- a/pkg/keyproofs/template.go +++ b/pkg/keyproofs/template.go @@ -173,7 +173,7 @@ var pageTPL = `
diff --git a/sour.is-keyproofs.service b/sour.is-keyproofs.service index 93c444c..285486f 100644 --- a/sour.is-keyproofs.service +++ b/sour.is-keyproofs.service @@ -6,7 +6,7 @@ After=syslog.target network.target Type=simple User=www-data WorkingDirectory=/var/www -ExecStart=/usr/local/bin/keyproofs +ExecStart=/usr/local/bin/sour.is-keyproofs Restart=always RestartSec=30