diff options
| author | 2021-05-06 17:02:25 +0000 | |
|---|---|---|
| committer | 2021-05-06 17:02:25 +0000 | |
| commit | 7c8769231b39e6682a9571342efcf20298734ff9 (patch) | |
| tree | d5fb3020a1225f2c4440674ccecb2609f7a0bd80 | |
| parent | 7e554ec2de3bf1949f92b769d3e71c341c969154 (diff) | |
| parent | 29161df446a8f01b1b277fd21c1f3c487b208afa (diff) | |
Merge "Prepare kzip script to support superproject sha as an environment variable"
| -rwxr-xr-x | build_kzip.bash | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build_kzip.bash b/build_kzip.bash index a4659d4c8..a09335ee0 100755 --- a/build_kzip.bash +++ b/build_kzip.bash @@ -5,6 +5,7 @@ # It is assumed that the current directory is the top of the source tree. # The following environment variables affect the result: # BUILD_NUMBER build number, used to generate unique ID (will use UUID if not set) +# SUPERPROJECT_SHA superproject sha, used to generate unique id (will use BUILD_NUMBER if not set) # DIST_DIR where the resulting all.kzip will be placed # KYTHE_KZIP_ENCODING proto or json (proto is default) # KYTHE_JAVA_SOURCE_BATCH_SIZE maximum number of the Java source files in a compilation unit @@ -14,6 +15,7 @@ # XREF_CORPUS source code repository URI, e.g., 'android.googlesource.com/platform/superproject' : ${BUILD_NUMBER:=$(uuidgen)} +: ${SUPERPROJECT_SHA:=$BUILD_NUMBER} : ${KYTHE_JAVA_SOURCE_BATCH_SIZE:=500} : ${KYTHE_KZIP_ENCODING:=proto} : ${XREF_CORPUS:?should be set} @@ -48,6 +50,6 @@ declare -r kzip_count=$(find "$out" -name '*.kzip' | wc -l) # Pack # TODO(asmundak): this should be done by soong. -declare -r allkzip="$BUILD_NUMBER.kzip" +declare -r allkzip="$SUPERPROJECT_SHA.kzip" "$out/soong/host/linux-x86/bin/merge_zips" "$DIST_DIR/$allkzip" @<(find "$out" -name '*.kzip') |