Skip to content

Commit

Permalink
Update to use the new protobuf library (#908)
Browse files Browse the repository at this point in the history
* Update to use the new protobuf library

* Update protoc deps

* Update grpc build steps

* Fix the protoc generate command

* Use any patch version

* Remove the protoc version from workflows entirely

* Update protoc gen
  • Loading branch information
tomer-stripe committed Jul 18, 2022
1 parent d2911f2 commit e8a7031
Show file tree
Hide file tree
Showing 19 changed files with 698 additions and 675 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install protoc deps
run: |
go get github.com/golang/protobuf/protoc-gen-go
go get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1
shell: bash
- name: Run Tests
run: make ci
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ clean:

# Handle all protobuf generation.
protoc:
@go get github.com/golang/protobuf/protoc-gen-go
@go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
@go get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
@go mod tidy
make protoc-gen-all
Expand All @@ -140,8 +141,10 @@ protoc-gen-all: protoc-gen-code protoc-gen-docs
# Generate protobuf go code
protoc-gen-code:
@protoc \
--go_out=plugins=grpc:./rpc \
--go_out=./rpc \
--go_opt=module=github.com/stripe/stripe-cli/rpc \
--go-grpc_out=require_unimplemented_servers=false:./rpc \
--go-grpc_opt=module=github.com/stripe/stripe-cli/rpc \
--proto_path ./rpc \
./rpc/*.proto \
|| (printf ${PROTOC_FAILURE_MESSAGE}; exit 1)
Expand Down
643 changes: 2 additions & 641 deletions rpc/commands.pb.go

Large diffs are not rendered by default.

658 changes: 658 additions & 0 deletions rpc/commands_grpc.pb.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions rpc/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/events_resend.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/fixtures.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/listen.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/login.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/login_status.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/logs_tail.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/sample_configs.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/sample_create.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/samples_list.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/trigger.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/triggers_list.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/version.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/webhook_endpoint_create.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rpc/webhook_endpoints_list.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8a7031

Please sign in to comment.