-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
57 lines (43 loc) · 1.19 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
53
54
55
56
57
.DEFAULT_GOAL := all
DEFAULT_BRANCH:=$(shell git remote show origin | sed -n '/HEAD branch/s/.*: //p')
include libraries.mk
.PHONY: install-tools
install-tools:
./scripts/install-tools.sh
.PHONY: build
build: $(DEPS) $(INSTALLED_LIBS)
go build -o koko main.go
.PHONY: run
run: $(DEPS) $(INSTALLED_LIBS)
go run main.go serve
.PHONY: lint
lint: verify-tidy $(DEPS) $(INSTALLED_LIBS)
buf format -d --exit-code
buf lint
./bin/golangci-lint run ./...
.PHONY: verify-tidy
verify-tidy:
./scripts/verify-tidy.sh
.PHONY: all
all: lint test
.PHONY: test
test: $(DEPS) $(INSTALLED_LIBS)
go test -tags testsetup -count 1 ./...
test-race: $(DEPS) $(INSTALLED_LIBS)
go test -tags testsetup -count 1 -race -p 1 ./...
.PHONY: test-integration
test-integration: $(DEPS) $(INSTALLED_LIBS)
go test -tags=testsetup,integration -timeout 15m -race -count 1 -p 1 ./internal/test/...
.PHONY: gen
gen: $(INSTALLED_LIBS)
./scripts/update-codegen.sh
.PHONY: gen-verify
gen-verify: $(DEPS) $(INSTALLED_LIBS)
./scripts/verify-codegen.sh
.PHONY: buf-format
buf-format:
buf format -w
.PHONY: buf-breaking
buf-breaking:
git fetch --no-tags origin $(DEFAULT_BRANCH)
buf breaking --against .git#branch=origin/$(DEFAULT_BRANCH)