tweaks to kythe build script -ignore failing build targets, kythe has its own bad builds logic A fresh index with 95% of targets is better than an old index with 100% stale targets. -write latest.txt to GCS bucket after uploading entries Change-Id: I40276c6347474c71a2c06aede806601856eadbe1
diff --git a/linux-x86_64/kythe/studio/build_studio_kythe.sh b/linux-x86_64/kythe/studio/build_studio_kythe.sh index 64ab1ad..8e292f6 100755 --- a/linux-x86_64/kythe/studio/build_studio_kythe.sh +++ b/linux-x86_64/kythe/studio/build_studio_kythe.sh
@@ -22,8 +22,10 @@ TARGETS="$(cat tools/base/bazel/build_targets)" # Build all targets and run the kythe extractor via extra_actions. -tools/base/bazel/bazel build \ - --experimental_action_listener=${EAL} -- ${TARGETS} +# ignore failures in the build as Kythe will do statistical analysis +# on build and produce indexes for builds with 95% coverage and up. +tools/base/bazel/bazel build --keep_going \ + --experimental_action_listener=${EAL} -- ${TARGETS} || true # Find all generated kythe index files. KINDEXES=$(find bazel-out/local-fastbuild/extra_actions/ \ @@ -44,4 +46,8 @@ if [ -n "${GSBUCKET}" ]; then TIMESTAMP=$(date +'%s') gsutil -m cp "${OUT_ENTRIES}/*" "${GSBUCKET}/${TIMESTAMP}/" + LATEST_FILE="$(mktemp)" + echo ${TIMESTAMP}>"${LATEST_FILE}" + gsutil cp "${LATEST_FILE}" "${GSBUCKET}/latest.txt" + rm "${LATEST_FILE}" fi \ No newline at end of file