Skip to content

Commit

Permalink
feat(extraction): generate build metadata kzip in bazel-extractor doc…
Browse files Browse the repository at this point in the history
…ker image (#4554)
  • Loading branch information
justbuchanan committed Jun 15, 2020
1 parent 468ad47 commit 7a52866
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kythe/extractors/bazel/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,13 @@ fi
mkdir -p "$KYTHE_OUTPUT_DIRECTORY"
find bazel-out/*/extra_actions/external/kythe_release -name '*.kzip' | \
xargs -r /kythe/tools/kzip merge --append --encoding "$KYTHE_KZIP_ENCODING" --output "$KYTHE_OUTPUT_DIRECTORY/compilations.kzip"

# Record the timestamp of the git commit in a metadata kzip.
/kythe/tools/kzip create_metadata \
--output buildmetadata.kzip \
--corpus "$KYTHE_CORPUS" \
--commit_timestamp "$(git log --pretty='%ad' -n 1 HEAD)"
/kythe/tools/kzip merge --append --encoding "$KYTHE_KZIP_ENCODING" --output "$KYTHE_OUTPUT_DIRECTORY/compilations.kzip" buildmetadata.kzip

/kythe/fix_permissions.sh "$KYTHE_OUTPUT_DIRECTORY"
test -f "$KYTHE_OUTPUT_DIRECTORY/compilations.kzip"

0 comments on commit 7a52866

Please sign in to comment.