Skip to content
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
6 changes: 6 additions & 0 deletions buf-connect-go.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
version: v1
managed:
enabled: true
go_package_prefix:
default: github.com/gravitational/teleport/gen/proto/go
plugins:
- name: go
strategy: all
path:
- go
- run
- google.golang.org/protobuf/cmd/protoc-gen-go
out: .
opt: module=github.com/gravitational/teleport
- name: connect-go
strategy: all
path:
- go
- run
Expand Down
1 change: 1 addition & 0 deletions buf-go.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: v1
plugins:
- name: go
strategy: all
path:
- go
- run
Expand Down
3 changes: 3 additions & 0 deletions buf-js.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ version: v1
plugins:
# https://github.com/protocolbuffers/protobuf/tree/v3.20.1/js
- name: js
strategy: all
out: gen/proto/js
opt:
- import_style=commonjs,binary

# https://github.com/grpc/grpc-node/tree/grpc-tools%401.12.4/packages/grpc-tools/
- name: grpc
strategy: all
out: gen/proto/js
opt: grpc_js
path: grpc_tools_node_protoc_plugin

# https://github.com/agreatfool/grpc_tools_node_protoc_ts/tree/v5.0.1
- name: ts
strategy: all
out: gen/proto/js
opt: "service=grpc-node"
18 changes: 15 additions & 3 deletions build.assets/genproto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,27 @@ main() {
# this for us (and which is what we use for the non-gogo protogen).
rm -fr gogogen
trap 'rm -fr gogogen' EXIT # don't leave files behind
buf generate --template=buf-gogo.gen.yaml
buf generate --template=buf-gogo.gen.yaml \
--path=api/proto/teleport/legacy/ \
--path=api/proto/teleport/attestation/ \
--path=api/proto/teleport/usageevents/ \
--path=api/proto/teleport/loginrule/ \
--path=proto/teleport/lib/web/envelope.proto \
--path=proto/teleport/lib/multiplexer/test/ping.proto
cp -r gogogen/github.com/gravitational/teleport/. .
# error out if there's anything outside of github.com/gravitational/teleport
rm -fr gogogen/github.com/gravitational/teleport
rmdir gogogen/github.com/gravitational gogogen/github.com gogogen

# Generate protoc-gen-go protos.
# Generate protoc-gen-go protos (preferred).
buf generate --template=buf-go.gen.yaml \
--path=proto/teleport/lib/teleterm/
--exclude-path=api/proto/teleport/legacy/ \
--exclude-path=api/proto/teleport/attestation/ \
--exclude-path=api/proto/teleport/usageevents/ \
--exclude-path=api/proto/teleport/loginrule/ \
--exclude-path=proto/teleport/lib/web/envelope.proto \
--exclude-path=proto/teleport/lib/multiplexer/test/ping.proto \
--exclude-path=proto/prehog/

# Generate connect-go protos.
buf generate --template=buf-connect-go.gen.yaml \
Expand Down

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

Loading