mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+protoc-gen-go-grpc
This commit is contained in:
parent
14d255e784
commit
1c791eaed9
58
projects/grpc.io/grpc-go/package.yml
Normal file
58
projects/grpc.io/grpc-go/package.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
distributable:
|
||||
url: https://github.com/grpc/grpc-go/archive/refs/tags/{{version.tag}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: grpc/grpc-go
|
||||
|
||||
provides:
|
||||
- bin/protoc-gen-go-grpc
|
||||
|
||||
dependencies:
|
||||
google.com/protobuf-go: ^1
|
||||
|
||||
companions:
|
||||
protobuf.dev: '*'
|
||||
go.dev: '*'
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.19
|
||||
working-directory: cmd/protoc-gen-go-grpc
|
||||
script:
|
||||
- go mod download
|
||||
- go build -v -trimpath -ldflags="$GO_LDFLAGS" -o $BUILDLOC .
|
||||
env:
|
||||
BUILDLOC: '{{prefix}}/bin/protoc-gen-go-grpc'
|
||||
GO_LDFLAGS:
|
||||
- -s
|
||||
- -w
|
||||
linux:
|
||||
GO_LDFLAGS:
|
||||
- -buildmode=pie
|
||||
|
||||
test:
|
||||
- run: cp $FIXTURE test.proto
|
||||
fixture: |
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "./test";
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.examples.helloworld";
|
||||
option java_outer_classname = "HelloWorldProto";
|
||||
|
||||
package helloworld;
|
||||
|
||||
service Greeter {
|
||||
rpc SayHello (HelloRequest) returns (HelloReply) {}
|
||||
}
|
||||
|
||||
message HelloRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message HelloReply {
|
||||
string message = 1;
|
||||
}
|
||||
- protoc --go_out=. --go-grpc_out=. test.proto
|
||||
- grep 'package test' test/test_grpc.pb.go
|
Loading…
Reference in a new issue