mirror of
https://github.com/github/semantic.git
synced 2024-12-21 05:41:54 +03:00
21 lines
500 B
Bash
Executable File
21 lines
500 B
Bash
Executable File
#!/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"
|
|
|
|
# Generate Haskell for semantic's protobuf types
|
|
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/go/src/$PROJECT -w /go/src/$PROJECT \
|
|
semantic-protoc --proto_path=proto \
|
|
--haskell_out=./src \
|
|
--jsonpb_haskell_out=./src \
|
|
semantic.proto
|