Few fixes to the gen_upb_api.sh script.

pull/19786/head
Nicolas "Pixel" Noble 6 years ago
parent e0de9e2ef6
commit d38178a27d
  1. 10
      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

Loading…
Cancel
Save