Merge branch 'fix/makefile' of github.com:xakon/pomo into xakon-fix/makefile

This commit is contained in:
Kevin Schoon 2018-02-01 09:54:10 -05:00
commit dd5c21e0eb
1 changed files with 10 additions and 8 deletions

View File

@ -13,22 +13,24 @@ endif
all: bin/pomo
clean:
rm -v bin/* 2> /dev/null || true
rm -v docs/* 2> /dev/null || true
-rm -fv bin/* docs/*
bindata.go:
go-bindata -pkg main -o $@ tomato-icon.png
bindata.go: tomato-icon.png
go-bindata -pkg main -o $@ $^
test:
go test ./...
go vet ./...
release: bindata.go
@echo mkdir bin 2>/dev/null || true
release: bin bindata.go
go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo-$(VERSION)-linux
docs: readme
cd www && hugo -d ../docs
readme:
cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > www/data/readme.json
readme: www/data/readme.json
www/data/readme.json: www/data README.md
cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > $@
www/data bin:
mkdir -p $@