diff --git a/build_image b/build_image index 67564d96bb..fc6dd05c57 100755 --- a/build_image +++ b/build_image @@ -62,6 +62,8 @@ show_help_if_requested "$@" # not needed for the typical developer workflow. DEFINE_integer build_attempt 1 \ "The build attempt for this image build." +DEFINE_string version "" \ + "Overrides version number in name to this version." DEFINE_integer jobs -1 \ "How many packages to build in parallel at maximum." DEFINE_boolean replace ${FLAGS_FALSE} \ diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 172e9ef041..d2cbfebee6 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -11,8 +11,13 @@ # Use canonical path since some tools (e.g. mount) do not like symlinks. # Append build attempt to output directory. -IMAGE_SUBDIR="R${CHROME_BRANCH}-${CHROMEOS_VERSION_STRING}-a\ +IMAGE_SUBDIR="R${CHROME_BRANCH}" +if [ -z "${FLAGS_version}" ]; then + IMAGE_SUBDIR="${IMAGE_SUBDIR}-${CHROMEOS_VERSION_STRING}-a\ ${FLAGS_build_attempt}" +else + IMAGE_SUBDIR="${IMAGE_SUBDIR}-${FLAGS_version}" +fi BUILD_DIR="${FLAGS_output_root}/${BOARD}/${IMAGE_SUBDIR}" OUTSIDE_OUTPUT_DIR="../build/images/${BOARD}/${IMAGE_SUBDIR}" IMAGES_TO_BUILD=