-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.17 KB
/
Makefile
File metadata and controls
42 lines (31 loc) · 1.17 KB
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
.PHONY: all
all: proto
.PHONY: clean
clean: tools-clean
.PHONY: tools
tools: bin/buf bin/mockery bin/protoc-gen-buf-breaking bin/protoc-gen-buf-lint bin/protoc-gen-connect-go bin/protoc-gen-go
.PHONY: tools-clean
tools-clean:
rm -rf bin
rm tools/dependencies
tools/dependencies: tools/go.mod tools/go.sum tools/tools.go
cd tools && go mod download
touch tools/dependencies
bin/buf: tools/dependencies
mkdir -p bin
cd tools && go build -o ../bin/buf github.com/bufbuild/buf/cmd/buf
bin/protoc-gen-buf-breaking: tools/dependencies
mkdir -p bin
cd tools && go build -o ../bin/protoc-gen-buf-breaking github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking
bin/protoc-gen-buf-lint: tools/dependencies
mkdir -p bin
cd tools && go build -o ../bin/protoc-gen-buf-lint github.com/bufbuild/buf/cmd/protoc-gen-buf-lint
bin/protoc-gen-go: tools/dependencies
mkdir -p bin
cd tools && go build -o ../bin/protoc-gen-go google.golang.org/protobuf/cmd/protoc-gen-go
BIN_DIR = $(shell pwd)/bin
.PHONY: proto
proto: bin/buf bin/protoc-gen-buf-breaking bin/protoc-gen-buf-lint bin/protoc-gen-go
PATH="$(BIN_DIR):$$PATH" buf lint
rm -rf internal/testtypes
PATH="$(BIN_DIR):$$PATH" buf generate