2021-07-19 19:14:09 +00:00
|
|
|
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
2020-10-14 21:14:57 +00:00
|
|
|
SOURCES = $(shell find . -type f -and -name "*.go" -or -name "*.html")
|
|
|
|
|
|
|
|
all: subscribe-bot
|
|
|
|
|
|
|
|
subscribe-bot: $(SOURCES)
|
|
|
|
go build -o $@ -ldflags "-X main.GitCommit=$(GIT_COMMIT)"
|
|
|
|
|
2021-07-20 19:40:30 +00:00
|
|
|
checkFmt:
|
|
|
|
[ -z "$$(git ls-files | grep '\.go$$' | xargs gofmt -l)" ] || (exit 1)
|
|
|
|
|
|
|
|
.PHONY: all checkFmt
|