-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (21 loc) · 837 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
.DEFAULT_GOAL := gen
.PHONY: run-local-server run-local-bot test lint gen docker breaking wc
run-local-server:
@go run cmd/server/main.go
run-local-bot: # does not clean up Discord commands so it can shutdown faster
@go run cmd/server/main.go -runDiscord -cleanUpDiscordCommands=false
test:
@go test -race -covermode=atomic -coverprofile=coverage.out ./...
lint:
@if golint ./... 2>&1 | grep '^'; then exit 1; fi; # Requires comments for exported functions
@golangci-lint run
@buf lint
gen:
@buf format -w
@buf generate
docker:
@docker build --tag bettor:$(shell git rev-parse HEAD | cut -c1-8) .
breaking: # detect breaking proto changes
@buf breaking --against ".git#branch=main"
wc:
@find . -name '*.go' -not -name '*_test.go' -not -name "*.connect.go" -not -name "*.pb.go" -not -name "*.pb.validate.go" | xargs wc