Makefile 725 B

1234567891011121314151617181920212223
  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.grpc.swift ../Examples/Echo/Generated/echo.grpc.swift
  11. deploy:
  12. cp echo.grpc.swift ../Examples/Echo/Generated/echo.grpc.swift
  13. clear :
  14. rm -f *.pb.swift *.grpc.swift
  15. clean : clear
  16. rm -rf protoc-gen-swiftgrpc Packages .build protoc-gen-swift Package.pins
  17. rm -rf Package.resolved