Skip to content

Commit

Permalink
gdebug: fix codegen script
Browse files Browse the repository at this point in the history
Fix bug where we fail to check out correct SHA if dir already exists.

Remove `exec` because it makes the `cp` fail to run.
  • Loading branch information
zpencer committed Oct 3, 2018
1 parent 3ce48e1 commit 5259aa5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gdebug/buildscripts/channelz_codgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ if [[ ! -d "$GITHUB_DIR"/grpc-web ]]; then
mkdir -p "$GITHUB_DIR"
cd "$GITHUB_DIR"
git clone https://github.com/grpc/grpc-web.git
cd grpc-web/
git checkout "$GRPC_WEB_SHA"
fi
cd "$GITHUB_DIR"/grpc-web/
git checkout "$GRPC_WEB_SHA"

cd "$GITHUB_DIR"/grpc-web//net/grpc/gateway/docker
docker build -t channelz_grpc_web_prereqs ./prereqs/

cd "$GRPC_ZPAGES_DIR"/docker
docker build -t channelz_codegen codegen

exec docker run --rm -v "$GRPC_ZPAGES_DIR"/docker/codegen/shared_dir:/shared_dir/ channelz_codegen bash -c "function fixFiles() { chown -R $(id -u):$(id -g) /shared_dir; }; trap fixFiles EXIT; /shared_dir/scripts/gen_channelz_pb.sh $GRPC_PROTO_SHA"
docker run --rm -v "$GRPC_ZPAGES_DIR"/docker/codegen/shared_dir:/shared_dir/ channelz_codegen bash -c "function fixFiles() { chown -R $(id -u):$(id -g) /shared_dir; }; trap fixFiles EXIT; /shared_dir/scripts/gen_channelz_pb.sh $GRPC_PROTO_SHA"

mv "$GRPC_ZPAGES_DIR"/docker/codegen/shared_dir/gen_out/channelz.js "$GRPC_ZPAGES_DIR"/web/channelzui/src/generated/channelz.js

0 comments on commit 5259aa5

Please sign in to comment.