Skip to content

Commit 574c47b

Browse files
authored
Merge pull request #36 from acchou/master
Explicitly specify protoc plugin in Plugin test target
2 parents 5009983 + 37922f1 commit 574c47b

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ project.xcworkspace
33
xcuserdata
44
.build
55
third_party/**
6+
Plugin/Packages/**
7+
Plugin/protoc-*
8+
Plugin/swiftgrpc.log
9+
Plugin/echo.*.swift

Plugin/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build: clear
99
cp .build/debug/protoc-gen-swift .
1010

1111
test: build
12-
protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --swiftgrpc_out=.
12+
protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --plugin=./protoc-gen-swiftgrpc --swiftgrpc_out=.
1313
diff echo.client.pb.swift ../Examples/Echo/Generated/echo.client.pb.swift
1414
diff echo.server.pb.swift ../Examples/Echo/Generated/echo.server.pb.swift
1515

Plugin/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ the Protocol Buffer Compiler.
66
It is built with the Swift Package Manager and the included
77
Makefile. The resulting binary is named `protoc-gen-swiftgrpc`
88
and can be called from `protoc` by adding the `--swiftgrpc_out`
9-
command-line option. For example, here's an invocation from
10-
the Makefile:
9+
command-line option and `--plugin` option. For example, here's an
10+
invocation from the Makefile:
1111

12-
protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --swiftgrpc_out=.
12+
protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --plugin=./protoc-gen-swiftgrpc --swiftgrpc_out=.
1313

1414
The plugin uses template files in the [Templates](Templates) directory.
1515
These files are compiled into the `protoc-gen-swiftgrpc` plugin executable.
1616

17+
The Swift gRPC plugin can be installed by placing the
18+
`protoc-gen-swiftgrpc` binary into one of the directories in your
19+
path. Specifying `--swiftgrpc_out` to `protoc` will automatically
20+
search the `PATH` environment variable for this binary.

0 commit comments

Comments
 (0)