diff options
author | Sasha Smundak <asmundak@google.com> | 2019-09-23 19:13:37 -0700 |
---|---|---|
committer | Sasha Smundak <asmundak@google.com> | 2019-09-24 10:28:36 -0700 |
commit | 69ee7b0967b02d9a4cf60b7d5bde57873fc2ecc9 (patch) | |
tree | c1aeb60a77e770114eb672e1c7aa16710a40eb76 /build_kzip.bash | |
parent | ec3e81b4becb539994dd11761b214bd16d3aa57f (diff) | |
download | build_soong-69ee7b0967b02d9a4cf60b7d5bde57873fc2ecc9.tar.gz build_soong-69ee7b0967b02d9a4cf60b7d5bde57873fc2ecc9.tar.bz2 build_soong-69ee7b0967b02d9a4cf60b7d5bde57873fc2ecc9.zip |
Generate revision.txt file containing unique ID.
Bug: 137977523
Test: manual
Change-Id: Ib1fbf6a4305bd843ace203e3f62a511fbdb168a1
Diffstat (limited to 'build_kzip.bash')
-rwxr-xr-x | build_kzip.bash | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build_kzip.bash b/build_kzip.bash index 5364e7f5..22ff5045 100755 --- a/build_kzip.bash +++ b/build_kzip.bash @@ -3,13 +3,13 @@ # Build kzip files (source files for the indexing pipeline) for the given configuration, # merge them and place the resulting all.kzip into $DIST_DIR. # It is assumed that the current directory is the top of the source tree. -# The following enviromnet variables affect the result: -# TARGET_PRODUCT target device name, e.g., `aosp_blueline` +# The following environment variables affect the result: +# TARGET_PRODUCT target device name, e.g., 'aosp_blueline' # TARGET_BUILD_VARIANT variant, e.g., `userdebug` # OUT_DIR where the build is happening (./out if not specified) # DIST_DIR where the resulting all.kzip will be placed -# XREF_CORPUS source code repository URI, e.g., -# `android.googlesource.com/platform/superproject` +# XREF_CORPUS source code repository URI, e.g., 'android.googlesource.com/platform/superproject' +# BUILD_NUMBER build number, used to generate unique ID (will use UUID if not set) # The extraction might fail for some source files, so run with -k build/soong/soong_ui.bash --build-mode --all-modules --dir=$PWD -k merge_zips xref_cxx xref_java @@ -23,3 +23,4 @@ declare -r kzip_count=$(find $OUT_DIR -name '*.kzip' | wc -l) # TODO(asmundak): this should be done by soong. declare -r allkzip=all.kzip "${OUT_DIR:-out}/soong/host/linux-x86/bin/merge_zips" "$DIST_DIR/$allkzip" @<(find $OUT_DIR -name '*.kzip') +echo "${BUILD_NUMBER:-$(uuidgen)}" >"$DIST_DIR/revision.txt" |