From d38178a27db894afe46baf23e188682117ff8434 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 30 Jul 2019 02:52:24 +0200 Subject: [PATCH] Few fixes to the gen_upb_api.sh script. --- tools/codegen/core/gen_upb_api.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh index d7871d88671..3b8e072d9f3 100755 --- a/tools/codegen/core/gen_upb_api.sh +++ b/tools/codegen/core/gen_upb_api.sh @@ -14,24 +14,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -# REQUIRES: Bazel set -ex +cd $(dirname $0)/../../.. +bazel=`pwd`/tools/bazel + if [ $# -eq 0 ]; then UPB_OUTPUT_DIR=$PWD/src/core/ext/upb-generated rm -rf $UPB_OUTPUT_DIR - mkdir $UPB_OUTPUT_DIR + mkdir -p $UPB_OUTPUT_DIR else UPB_OUTPUT_DIR=$1 fi pushd third_party/protobuf -bazel build :protoc +$bazel build :protoc PROTOC=$PWD/bazel-bin/protoc popd pushd third_party/upb -bazel build :protoc-gen-upb +$bazel build :protoc-gen-upb UPB_PLUGIN=$PWD/bazel-bin/protoc-gen-upb popd