Skip to content

Commit

Permalink
fix docker generate
Browse files Browse the repository at this point in the history
Signed-off-by: 923048992@qq.com <923048992@qq.com>
  • Loading branch information
Okabe-Rintarou-0 committed Jul 16, 2024
1 parent d83cb13 commit 65fb667
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hack/gen_protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ PROTO_SRC=$@

arch=$(get_arch)

# if protoc-c is 1.4.x
if protoc-c --version | grep -q -E "protobuf-c 1\.4\.[0-9]"; then
protoc-c --proto_path=$PROTO_PATH --c_out=. $PROTO_SRC
else
echo "Generate proto files in docker"
echo $PROTO_PATH
echo $PROTO_SRC
docker run --rm \
-v $ROOT_DIR:/kmesh \
--name kmesh-build "ghcr.io/kmesh-net/kmesh-build-${arch}:latest" \
cd /kmesh/api && protoc-c --proto_path=$PROTO_PATH --c_out=. $PROTO_SRC
--name kmesh-build \
ghcr.io/kmesh-net/kmesh-build-${arch}:latest \
sh -c "cd /kmesh/api && protoc-c --proto_path=$PROTO_PATH --c_out=. $PROTO_SRC"
fi

0 comments on commit 65fb667

Please sign in to comment.