Makefile 915 B

123456789101112131415161718192021222324
  1. default: build
  2. build: clear
  3. swift build # This run is to build the template encoder
  4. .build/debug/TemplateEncoder > Sources/protoc-gen-swiftgrpc/templates.swift
  5. swift build # This run is to build the plugin
  6. cp .build/debug/protoc-gen-swiftgrpc .
  7. cp .build/debug/protoc-gen-swift .
  8. test: build
  9. protoc ../Examples/Echo/echo.proto --proto_path=../Examples/Echo --plugin=./protoc-gen-swiftgrpc --swiftgrpc_out=. --swift_out=.
  10. diff echo.client.pb.swift ../Examples/Echo/Generated/echo.client.pb.swift
  11. diff echo.server.pb.swift ../Examples/Echo/Generated/echo.server.pb.swift
  12. deploy:
  13. cp echo.client.pb.swift ../Examples/Echo/Generated/echo.client.pb.swift
  14. cp echo.server.pb.swift ../Examples/Echo/Generated/echo.server.pb.swift
  15. clear :
  16. rm -f echo.pb.swift echo.client.pb.swift echo.server.pb.swift swiftgrpc.log
  17. clean : clear
  18. rm -rf protoc-gen-swiftgrpc Packages .build protoc-gen-swift Package.pins