Files
orion_greptime_proto/scripts/generate-go.sh
T
zyy17 36147379c3 feat: add go protobuf generation (#6)
* feat: add go protobuf generation

* ci: check go protbuf generation

* refactor: use 'namely/protoc-all:1.51_1' to compile the proto instead of locally binary

* refactor: no need to add the 'bin/' igore

* chore: modify code format

* refactor: add some comments to describe our modification
2023-02-15 15:10:17 +08:00

19 lines
655 B
Bash
Executable File

#! /usr/bin/env bash
set -e
GO_OUTPUT=./go
# TODO(zyy17): Can we make the following commands as one command?
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/meta/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/prometheus/remote/*.proto