-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (31 loc) · 1.14 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
PROJECT_ROOT_DIR := $(shell git rev-parse --show-toplevel)
# Help
.PHONY: default
default:
@echo "Please specify a build target. The choices are:"
@echo " init: Perform a one-time initialization"
@echo " binary: Create Go binaries"
@echo " clean: Clean build directory"
@echo " proto-gen: Regenerate protobuf files"
@echo " proto-lint: Lint protobuf files"
@echo " proto-fmt: Format protobuf files"
@echo " proto-mod: Update buf modules"
@echo " proto-bcd: Runs breaking change detection for your protos"
@echo " fmt: Format all Go code"
@echo " lint: Run lint checks"
@echo " test: Run unit tests"
@echo " test-e2e: Run end-to-end tests"
@echo " release-dry-run: Release dry run"
@false
.PHONY: init
init:
@echo "Initializing project..."
@go get github.com/golang/[email protected]
@make proto-mod
@make proto-fmt
@make proto-gen
@go mod tidy
@go test ./...
@echo -e "\n# Ignore buf cache directory\n.cache/" >> .gitignore
# Include all sub-makefiles
include mk/*