From c10ca55e8a4bf6d79fba568b44666767e4f18f0c Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Wed, 22 Dec 2021 09:07:36 +0100 Subject: [PATCH] simlify dependency installation for buf --- .make/protobuf.mk | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.make/protobuf.mk b/.make/protobuf.mk index 5193833ca..21e74cbe4 100644 --- a/.make/protobuf.mk +++ b/.make/protobuf.mk @@ -1,19 +1,14 @@ - +# bingo creates symlinks from the -l option in GOBIN, from where +# we can easily use it with buf. To have the symlinks inside this +# repo and on a known location, we set GOBIN to .bingo in the root +# of the repository (therefore we need to cd ..) .PHONY: protoc-deps protoc-deps: $(BINGO) - @# #TODO: bingo creates symlinks from the -l option in the current directory - @# if no GOPATH and GOBIN is set, but they should reside inside .bingo - @# for now we move them manually - @cd .. && GOPATH="" GOBIN="" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go - @cd .. && mv protoc-gen-go .bingo/ - @cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v3 - @cd .. && mv protoc-gen-micro .bingo/ - @cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb - @cd .. && mv protoc-gen-microweb .bingo/ - @cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 - @cd .. && mv protoc-gen-openapiv2 .bingo/ - @cd .. && GOPATH="" GOBIN="" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc - @cd .. && mv protoc-gen-doc .bingo/ + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 + @cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc .PHONY: buf-generate buf-generate: $(BUF) protoc-deps