Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #54 from owncloud/install-protoc-deps
Browse files Browse the repository at this point in the history
Use `go install` instead of `go get` for protoc dependencies
  • Loading branch information
kulmann authored Aug 20, 2020
2 parents e74e9b0 + 686123f commit 0b3f097
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,37 +158,41 @@ watch:
go run github.com/cespare/reflex -c reflex.conf

$(GOPATH)/bin/protoc-gen-go:
GO111MODULE=off go get -v github.com/golang/protobuf/protoc-gen-go
GO111MODULE=off go install github.com/golang/protobuf/protoc-gen-go

$(GOPATH)/bin/protoc-gen-micro:
GO111MODULE=on go get -v github.com/micro/protoc-gen-micro/v2
GO111MODULE=on go install github.com/micro/protoc-gen-micro/v2

$(GOPATH)/bin/protoc-gen-microweb:
GO111MODULE=off go get -v github.com/owncloud/protoc-gen-microweb
GO111MODULE=off go install github.com/owncloud/protoc-gen-microweb

$(GOPATH)/bin/protoc-gen-swagger:
GO111MODULE=off go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
GO111MODULE=off go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger

$(PROTO_SRC)/settings.pb.go: $(PROTO_SRC)/settings.proto
protoc \
--plugin=protoc-gen-go=$GOPATH/bin/protoc-gen-go \
-I=third_party/ \
-I=$(PROTO_SRC)/ \
--go_out=. settings.proto

$(PROTO_SRC)/settings.pb.micro.go: $(PROTO_SRC)/settings.proto
protoc \
--plugin=protoc-gen-micro=$GOPATH/bin/protoc-gen-micro \
-I=third_party/ \
-I=$(PROTO_SRC)/ \
--micro_out=. settings.proto

$(PROTO_SRC)/settings.pb.web.go: $(PROTO_SRC)/settings.proto
protoc \
--plugin=protoc-gen-microweb=$GOPATH/bin/protoc-gen-microweb \
-I=third_party/ \
-I=$(PROTO_SRC)/ \
--microweb_out=. settings.proto

$(PROTO_SRC)/settings.swagger.json: $(PROTO_SRC)/settings.proto
protoc \
--plugin=protoc-gen-swagger=$GOPATH/bin/protoc-gen-swagger \
-I=third_party/ \
-I=$(PROTO_SRC)/ \
--swagger_out=$(PROTO_SRC) settings.proto
Expand Down

0 comments on commit 0b3f097

Please sign in to comment.