24 lines
592 B
Bash
Executable File
24 lines
592 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Delete generated code
|
|
rm -rf python/cursorius_pipeline_api_v2/proto
|
|
mkdir -p python/cursorius_pipeline_api_v2/proto
|
|
|
|
# Generate python grpc code
|
|
poetry -C "$PWD/python" install
|
|
poetry -C python run \
|
|
python -m grpc_tools.protoc \
|
|
-I"api/v2" \
|
|
--python_out=./python/cursorius_pipeline_api_v2 \
|
|
--pyi_out=./python/cursorius_pipeline_api_v2 \
|
|
--grpc_python_out=./python/cursorius_pipeline_api_v2 \
|
|
api/v2/*
|
|
|
|
# Generate go grpc code
|
|
buf generate
|
|
|
|
# Build python docker container
|
|
pushd python
|
|
docker build . -t cursorius-pipeline:v2
|
|
popd
|