Skip bazel build in objectivec/generate_well_known_types.sh.
Every where the script is invoked from protoc is already built, and this more follows the model used by similar scripts for other languages. PiperOrigin-RevId: 508694936pull/11888/head
parent
363fa89b1f
commit
6e00b6b2f5
|
@ -204,7 +204,7 @@ else
|
|||
fi
|
||||
|
||||
# Ensure the WKT sources checked in are current.
|
||||
time objectivec/generate_well_known_types.sh --check-only $BazelFlags
|
||||
objectivec/generate_well_known_types.sh --check-only
|
||||
|
||||
header "Checking on the ObjC Runtime Code"
|
||||
# Some of the kokoro machines don't have python3 yet, so fall back to python if need be.
|
||||
|
|
|
@ -9,8 +9,7 @@ readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")")
|
|||
readonly ObjCDir="${ScriptDir}"
|
||||
readonly ProtoRootDir="${ObjCDir}/.."
|
||||
|
||||
# Invoke with BAZEL=bazelisk to use that instead.
|
||||
readonly BazelBin="${BAZEL:-bazel} ${BAZEL_STARTUP_FLAGS:-}"
|
||||
cd "${ProtoRootDir}"
|
||||
|
||||
# Flag for continuous integration to check that everything is current.
|
||||
CHECK_ONLY=0
|
||||
|
@ -19,7 +18,11 @@ if [[ $# -ge 1 && ( "$1" == "--check-only" ) ]] ; then
|
|||
shift
|
||||
fi
|
||||
|
||||
cd "${ProtoRootDir}"
|
||||
readonly PROTOC_PATH="${PROTOC:-${ProtoRootDir}/bazel-bin/protoc}"
|
||||
if [[ ! -x "${PROTOC_PATH}" ]] ; then
|
||||
echo "Failed to find executable protoc: ${PROTOC_PATH}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -e src/google/protobuf/stubs/common.h ]]; then
|
||||
cat >&2 << __EOF__
|
||||
|
@ -29,9 +32,6 @@ __EOF__
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure the compiler is current.
|
||||
${BazelBin} build //:protoc $@
|
||||
|
||||
cd src
|
||||
declare -a RUNTIME_PROTO_FILES=( \
|
||||
google/protobuf/any.proto \
|
||||
|
@ -50,7 +50,7 @@ declare -a OBJC_EXTENSIONS=( .pbobjc.h .pbobjc.m )
|
|||
# Generate to a temp directory to see if they match.
|
||||
TMP_DIR=$(mktemp -d)
|
||||
trap "rm -rf ${TMP_DIR}" EXIT
|
||||
${ProtoRootDir}/bazel-bin/protoc --objc_out="${TMP_DIR}" ${RUNTIME_PROTO_FILES[@]}
|
||||
"${PROTOC_PATH}" --objc_out="${TMP_DIR}" ${RUNTIME_PROTO_FILES[@]}
|
||||
|
||||
DID_COPY=0
|
||||
for PROTO_FILE in "${RUNTIME_PROTO_FILES[@]}"; do
|
||||
|
|
Loading…
Reference in New Issue