simlify dependency installation for buf

This commit is contained in:
Willy Kloucek
2021-12-22 09:07:36 +01:00
parent 604e29a96f
commit c10ca55e8a

View File

@@ -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