-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
34 lines (24 loc) · 1.05 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
.DEFAULT_GOAL := all
all: generate-modelpb generate gomodtidy update-licenses fieldalignment fmt protolint
test:
go test -v -race ./...
fmt:
go run golang.org/x/tools/cmd/[email protected] -w .
protolint:
docker run --volume "$(PWD):/workspace" --workdir /workspace bufbuild/buf lint model/proto
docker run --volume "$(PWD):/workspace" --workdir /workspace bufbuild/buf breaking model/proto --against https://github.com/elastic/apm-data.git#branch=main,subdir=model/proto
gomodtidy:
go mod tidy -v
generate_code:
go generate ./...
generate: generate_code update-licenses
fieldalignment:
go run golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/[email protected] -test=false $(shell go list ./... | grep -v modeldecoder/generator | grep -v test | grep -v model/modelpb)
update-licenses:
go run github.com/elastic/[email protected] -ext .go .
go run github.com/elastic/[email protected] -ext .proto .
install-protobuf:
./tools/install-protobuf.sh
generate-modelpb: install-protobuf
./tools/generate-modelpb.sh
@$(MAKE) update-licenses fmt