Merge "Generate revision.txt file containing unique ID."

am: a628a97ed5

Change-Id: Ia81d5e8ab068a72c43d61b96188c858171b11d75
This commit is contained in:
Alexander Smundak
2019-09-25 13:32:46 -07:00
committed by android-build-merger

View File

@@ -3,13 +3,13 @@
# Build kzip files (source files for the indexing pipeline) for the given configuration, # Build kzip files (source files for the indexing pipeline) for the given configuration,
# merge them and place the resulting all.kzip into $DIST_DIR. # 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. # It is assumed that the current directory is the top of the source tree.
# The following enviromnet variables affect the result: # The following environment variables affect the result:
# TARGET_PRODUCT target device name, e.g., `aosp_blueline` # TARGET_PRODUCT target device name, e.g., 'aosp_blueline'
# TARGET_BUILD_VARIANT variant, e.g., `userdebug` # TARGET_BUILD_VARIANT variant, e.g., `userdebug`
# OUT_DIR where the build is happening (./out if not specified) # OUT_DIR where the build is happening (./out if not specified)
# DIST_DIR where the resulting all.kzip will be placed # DIST_DIR where the resulting all.kzip will be placed
# XREF_CORPUS source code repository URI, e.g., # XREF_CORPUS source code repository URI, e.g., 'android.googlesource.com/platform/superproject'
# `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 # 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 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. # TODO(asmundak): this should be done by soong.
declare -r allkzip=all.kzip declare -r allkzip=all.kzip
"${OUT_DIR:-out}/soong/host/linux-x86/bin/merge_zips" "$DIST_DIR/$allkzip" @<(find $OUT_DIR -name '*.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"