Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch buf to use local tooling #60

Merged
merged 1 commit into from Jun 6, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Expand Up @@ -40,12 +40,12 @@ jobs:
name: "Generate Protobufs"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/setup-go@v2"
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "^1.16"
- name: "Install local Go Protobuf plugins"
run: "go install github.com/envoyproxy/protoc-gen-validate@v0.6.7"
- uses: "actions/checkout@v2"
- name: "Install Go Tools"
run: "./install-tools.sh"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just inline the script here? It's already so small.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make it easy to install for people on the CLI too

- uses: "bufbuild/buf-setup-action@v0.6.0"
with:
version: "1.3.1"
Expand Down
9 changes: 5 additions & 4 deletions buf.gen.yaml
Expand Up @@ -2,18 +2,19 @@
---
version: "v1"
plugins:
- remote: "buf.build/library/plugins/go:v1.27.1-1"
- name: "go"
out: "proto"
opt: "paths=source_relative"
- remote: "buf.build/library/plugins/go-grpc:v1.1.0-2"
- name: "go-grpc"
out: "proto"
opt: "paths=source_relative"
- name: "validate"
out: "proto"
opt: "paths=source_relative,lang=go"
- remote: "buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.6.0-1"
- name: "grpc-gateway"
out: "proto"
opt: "paths=source_relative"
- remote: "buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1"
- name: "openapiv2"
out: "proto"
strategy: all
opt: "allow_merge=true"
1 change: 1 addition & 0 deletions go.mod
Expand Up @@ -13,6 +13,7 @@ require (
golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0 // indirect
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af
google.golang.org/grpc v1.40.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
10 changes: 10 additions & 0 deletions go.sum

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

2 changes: 2 additions & 0 deletions install-tools.sh
@@ -0,0 +1,2 @@
tools=$(go list -f '{{range .Imports}}{{.}} {{end}}' tools.go)
go install $tools
4 changes: 4 additions & 0 deletions proto/authzed/api/v0/developer_grpc.pb.go

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

28 changes: 14 additions & 14 deletions proto/authzed/api/v1/permission_service.pb.go

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

4 changes: 4 additions & 0 deletions proto/authzed/api/v1/permission_service_grpc.pb.go

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

8 changes: 4 additions & 4 deletions proto/authzed/api/v1/schema_service.pb.go

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

4 changes: 4 additions & 0 deletions proto/authzed/api/v1/schema_service_grpc.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 proto/authzed/api/v1/watch_service.pb.go

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

4 changes: 4 additions & 0 deletions proto/authzed/api/v1/watch_service_grpc.pb.go

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

4 changes: 4 additions & 0 deletions proto/authzed/api/v1alpha1/schema_grpc.pb.go

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