mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
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
|