kevinschoon-pomo/Makefile

27 lines
502 B
Makefile
Raw Normal View History

2018-01-21 16:38:17 +01:00
VERSION ?= $(shell git describe --tags 2>/dev/null)
ifeq "$(VERSION)" ""
VERSION := UNKNOWN
endif
.PHONY: \
2018-01-21 16:38:17 +01:00
all \
test
all: bin/pomo
clean:
2018-01-21 16:38:17 +01:00
rm -v bin/* 2> /dev/null || true
bindata.go:
go-bindata -pkg main -o $@ tomato-icon.png
2018-01-21 16:38:17 +01:00
test:
go test ./...
bin/pomo: bindata.go
2018-01-21 16:38:17 +01:00
@echo mkdir bin 2>/dev/null || true
go build -ldflags "-X main.Version=$(VERSION)" -o bin/pomo
2018-01-22 15:59:03 +01:00
www/data/readme.json:
cat README.md | python -c 'import json,sys; print(json.dumps({"content": sys.stdin.read()}))' > $@