-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (32 loc) · 886 Bytes
/
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
TASK ?= tool/bin/task
.PHONY: default
default:
$(TASK): tool/task/main.go $(wildcard tool/task/commands/*.go) go.mod go.sum
go build -o $@ $<
.PHONY: task
task: $(TASK)
.PHONY: deps.download
deps.download: | $(TASK)
$(TASK) go mod download
.PHONY: deps.update
deps.update: | $(TASK)
$(TASK) go get -u -t ./...
go get -u -t ./...
$(TASK) go mod tidy
go mod tidy
go work sync
.PHONY: test
test: | $(TASK)
$(TASK) go test ./...
.PHONY: cover
cover: | $(TASK)
$(TASK) go test -covermode=atomic -coverprofile=coverage.out ./...
$(TASK) go tool cover -html=coverage.out -o coverage.html
.PHONY: clean
clean:
find . -name coverage.out -delete
find . -name coverage.html -delete
.github/dependabot.yml: tool/dependabot.yml.tmpl $(shell find . -name go.mod) | $(TASK)
$(TASK) gen dependabot
go.work: $(shell find . -name go.mod) | $(TASK)
$(TASK) gen go-workspace