2020-11-23 13:58:19 -07:00
|
|
|
NAME=sour.is-ipseity
|
|
|
|
BUMP?=current
|
|
|
|
DATE:=$(shell date -u +%FT%TZ)
|
|
|
|
HASH:=$(shell git rev-pars HEAD 2> /dev/null)
|
|
|
|
VERSION:=$(shell BUMP=$(BUMP) ./version.sh)
|
|
|
|
|
|
|
|
|
|
|
|
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) \
|
|
|
|
" \
|
|
|
|
.
|
|
|
|
|
|
|
|
build:
|
2020-11-23 14:21:58 -07:00
|
|
|
go build -v \
|
2020-11-23 13:58:19 -07:00
|
|
|
-ldflags "\
|
|
|
|
-X main.AppVersion=$(VERSION) \
|
|
|
|
-X main.BuildHash=$(HASH) \
|
|
|
|
-X main.BuildDate=$(DATE) \
|
|
|
|
" \
|
|
|
|
.
|
2020-11-23 14:21:58 -07:00
|
|
|
|
|
|
|
install: build
|
|
|
|
install ./keyproofs /usr/local/bin
|
|
|
|
install ./sour.is-keyproofs.service /lib/systemd/system
|