forked from parkr/auto-reply
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
REV:=$(shell git rev-parse HEAD)
ROOT_PKG=github.com/parkr/auto-reply
BINARIES = bin/check-for-outdated-dependencies \
bin/jekyllbot \
bin/mark-and-sweep-stale-issues \
bin/nudge-maintainers-to-release \
bin/unearth \
bin/unify-labels
.PHONY: all
all: fmt build test
.PHONY: cibuild
cibuild: fmt build test
.PHONY: fmt
fmt:
find . | grep -v '^vendor' | grep '\.go$$' | xargs gofmt -s -l -w | sed -e 's/^/Fixed /'
go list $(ROOT_PKG)/... | xargs go fix
go list $(ROOT_PKG)/... | xargs go vet
.PHONY: $(BINARIES)
$(BINARIES): clean
go build -o ./$@ ./$(patsubst bin/%,cmd/%,$@)
.PHONY: build
build: clean $(BINARIES)
ls -lh bin/
.PHONY: test
test:
go test github.com/parkr/auto-reply/...
.PHONY: server
server: build
source .env && ./bin/auto-reply
.PHONY: unearth
unearth: build
source .env && ./bin/unearth
.PHONY: mark-and-sweep
mark-and-sweep: build
source .env && ./bin/mark-and-sweep-stale-issues
.PHONY: clean
clean:
rm -rf bin
.PHONY: docker-build
docker-build:
docker build -t auto-reply:$(REV) .