Browse Source

Name the resulting file $BUILD_NUMBER.kzip, drop revision.txt

Bug: 137977523
Test: manual
Change-Id: Ifb02f033baaf6ee1668ccaa56b59edd05dce078a
Sasha Smundak 4 years ago
parent
commit
114d966c27
1 changed files with 3 additions and 2 deletions
  1. 3 2
      build_kzip.bash

+ 3 - 2
build_kzip.bash

@@ -16,6 +16,7 @@
 # contains only generated files.
 : ${OUT_DIR:=$PWD/out}
 [[ "$OUT_DIR" =~ ^/ ]] || { echo "$OUT_DIR is not an absolute path"; exit 1; }
+: ${BUILD_NUMBER:=$(uuidgen)}
 
 # The extraction might fail for some source files, so run with -k
 OUT_DIR=$OUT_DIR build/soong/soong_ui.bash --build-mode --all-modules --dir=$PWD -k merge_zips xref_cxx xref_java
@@ -27,6 +28,6 @@ declare -r kzip_count=$(find $OUT_DIR -name '*.kzip' | wc -l)
 
 # Pack
 # TODO(asmundak): this should be done by soong.
-declare -r allkzip=all.kzip
+declare -r allkzip="$BUILD_NUMBER.kzip"
 "$OUT_DIR/soong/host/linux-x86/bin/merge_zips" "$DIST_DIR/$allkzip" @<(find $OUT_DIR -name '*.kzip')
-echo "${BUILD_NUMBER:-$(uuidgen)}" >"$DIST_DIR/revision.txt"
+