Skip to content

Commit

Permalink
Move protoc-gen-swiftgrpc plugin to main Sources directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks committed Mar 4, 2018
1 parent 5807f3f commit aa746f8
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 33 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ script:
- export PATH=.:$HOME/local/bin:$PATH
- export LD_LIBRARY_PATH=$HOME/local/lib
- make test
- cd Plugin
- make test
- cd ..
- make test-plugin
- make test-examples
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
CFLAGS = -Xcc -ISources/BoringSSL/include

all:
swift package generate-xcodeproj
swift build -v $(CFLAGS)
cp .build/debug/protoc-gen-swift .
cp .build/debug/protoc-gen-swiftgrpc .

test:
swift build -v $(CFLAGS)
project:
swift package generate-xcodeproj

test: all
swift test -v $(CFLAGS)

test-examples:
cd Examples/Echo/PackageManager; make test
cd Examples/Simple/PackageManager; make

test-plugin:
protoc Examples/Echo/echo.proto --proto_path=Examples/Echo --plugin=.build/debug/protoc-gen-swiftgrpc --swiftgrpc_out=/tmp --swiftgrpc_opt=TestStubs=true
diff /tmp/echo.grpc.swift Examples/Echo/Generated/echo.grpc.swift

clean:
rm -rf Packages
rm -rf .build
Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ let package = Package(
dependencies: ["CgRPC"]),
Target(name: "CgRPC",
dependencies: ["BoringSSL"]),
Target(name: "RootsEncoder")
Target(name: "RootsEncoder"),
Target(name: "protoc-gen-swiftgrpc")
],
dependencies: [
.Package(url: "https://github.com/Zewo/zlib.git", majorVersion: 0, minor: 4),
Expand Down
25 changes: 0 additions & 25 deletions Plugin/Package.swift

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ generate the necessary support code.
Binary releases of `protoc`, the Protocol Buffer Compiler, are
available on [GitHub](https://github.com/google/protobuf/releases).

To build the plugins, run `make` in the [Plugin](Plugin) directory.
To build the plugins, run `make` in the main directory.
This uses the Swift Package Manager to build both of the necessary
plugins: `protoc-gen-swift`, which generates Protocol Buffer support code
and `protoc-gen-swiftgrpc`, which generates gRPC interface code.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit aa746f8

Please sign in to comment.