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

Fix protobuf gen #56

Merged
merged 2 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def testing(ctx):
'image': 'webhippie/golang:1.13',
'pull': 'always',
'commands': [
'make build',
'make protobuf build',
],
'volumes': [
{
Expand Down Expand Up @@ -193,7 +193,7 @@ def docker(ctx, arch):
'image': 'webhippie/golang:1.13',
'pull': 'always',
'commands': [
'make build',
'make protobuf build',
],
'volumes': [
{
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,41 +158,41 @@ watch:
go run github.com/cespare/reflex -c reflex.conf

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

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

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

$(GOPATH)/bin/protoc-gen-swagger:
GO111MODULE=off go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
GO111MODULE=off go get -v 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 \
--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 \
--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 \
--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 \
--plugin=protoc-gen-swagger=$(GOPATH)/bin/protoc-gen-swagger \
-I=third_party/ \
-I=$(PROTO_SRC)/ \
--swagger_out=$(PROTO_SRC) settings.proto
Expand Down