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

Commit

Permalink
add support for generating both client and server
Browse files Browse the repository at this point in the history
  • Loading branch information
severnt committed Aug 27, 2020
1 parent 9d0378b commit db16cd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swift/internal/swift_grpc_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ def _register_grpcswift_generate_action(
elif flavor == "server":
protoc_args.add("--swiftgrpc_opt=Client=false")
protoc_args.add("--swiftgrpc_opt=Server=true")
elif flavor == "client_server":
protoc_args.add("--swiftgrpc_opt=Client=true")
protoc_args.add("--swiftgrpc_opt=Server=true")
else:
fail("Unsupported swift_grpc_library flavor", attr = "flavor")
protoc_args.add_all(
Expand Down Expand Up @@ -532,6 +535,7 @@ on the `swift_grpc_library` implementing the service.
"client",
"client_stubs",
"server",
"client_server",
],
mandatory = True,
doc = """\
Expand All @@ -540,6 +544,7 @@ The kind of definitions that should be generated:
* `"client"` to generate client definitions.
* `"client_stubs"` to generate client test stubs.
* `"server"` to generate server definitions.
* `"client_server"` to generate both client and server definitions.
""",
),
"proto_visibility": attr.string(
Expand Down

0 comments on commit db16cd8

Please sign in to comment.