Skip to content

Commit 444466f

Browse files
authored
chore(makefile): Install protoc dependecies (#105)
1 parent bd41ee3 commit 444466f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
ifeq ($(OS),Windows_NT)
2+
protoc_install :=
3+
else ifeq ($(shell uname -s),Darwin)
4+
protoc_install := brew install protobuf
5+
else ifeq ($(shell uname -s),Linux)
6+
protoc_install := apt install -y protobuf-compiler
7+
endif
8+
19
.PHONY: test
210
test:
311
go test ./...
@@ -8,4 +16,7 @@ lint:
816

917
.PHONY: gen-proto
1018
gen-proto:
19+
$(protoc_install)
20+
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
21+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
1122
protoc --proto_path=. --go_out . --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative internal/pb/base.proto internal/pb/source.proto internal/pb/destination.proto

0 commit comments

Comments
 (0)