mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
Add an advanced option to build_image so that a caller can specify the version.
This change adds the ability for a caller to pass a specific version name to build_image rather than rely on parsing of chromeos_version.sh + attempt number. BUG=chromium-os:29077 TEST=Ran build_image w/ w/out option Change-Id: I69b76ae4bfc148325686902606476a0aae293e56 Reviewed-on: https://gerrit.chromium.org/gerrit/19861 Tested-by: Chris Sosa <sosa@chromium.org> Reviewed-by: David James <davidjames@chromium.org> Commit-Ready: Chris Sosa <sosa@chromium.org>
This commit is contained in:
parent
df23c6db56
commit
dbc853b2bf
@ -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} \
|
||||
|
@ -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=
|
||||
|
Loading…
x
Reference in New Issue
Block a user