subscribe-bot/Makefile

13 lines
331 B
Makefile
Raw Normal View History

2021-07-19 14:14:09 -05:00
GIT_COMMIT = $(shell git rev-parse --short HEAD)
2020-10-14 16:14:57 -05: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 14:40:30 -05:00
checkFmt:
[ -z "$$(git ls-files | grep '\.go$$' | xargs gofmt -l)" ] || (exit 1)
.PHONY: all checkFmt