1
1
mirror of https://github.com/github/semantic.git synced 2025-01-05 22:28:10 +03:00
semantic/script/protoc

22 lines
612 B
Plaintext
Raw Normal View History

2019-07-06 01:11:33 +03:00
#!/usr/bin/env bash
#/ Usage: script/protoc
#/
#/ Generate code from .proto files
set -ex
cd "$(dirname "$0")/.."
docker build -t semantic-protoc --target protoc .
PARENT_DIR=$(dirname $(pwd))
export PROJECT="github.com/github/semantic"
2020-02-13 02:00:28 +03:00
# Generate Haskell for semantic's protobuf types. See the entrypoint in
# Dockerfile for where the protoc pluggins are configured.
2019-07-06 01:11:33 +03:00
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/go/src/$PROJECT -w /go/src/$PROJECT \
2019-10-02 23:14:16 +03:00
semantic-protoc --proto_path=proto \
--haskell_out=./semantic-proto/src \
--jsonpb_haskell_out=./semantic-proto/src \
2019-07-06 01:11:33 +03:00
semantic.proto