From 8b3234a5041f001f3525d61798be4bab3e29d31c Mon Sep 17 00:00:00 2001 From: David James Date: Wed, 20 Jul 2011 16:12:19 -0700 Subject: [PATCH] Accept change identifier as an argument. This allows the buildbot to calculate the change identifier and pass it into archive_build. This makes it easier for us to parallelize the archive_build step. BUG=chromium-os:12220 TEST=Verify this argument works. Verify archive_build works without the argument too. Change-Id: I6b757cc7795fb6f2f24a400502fe6f70416ab44f Reviewed-on: http://gerrit.chromium.org/gerrit/4440 Reviewed-by: Chris Sosa Tested-by: David James --- archive_build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archive_build.sh b/archive_build.sh index 2d3f1afab5..3ce4608335 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -72,6 +72,7 @@ DEFINE_string test_tarball "" "Optional path to test tarball to archive" DEFINE_boolean test_mod $FLAGS_TRUE "Modify image for testing purposes" DEFINE_boolean prebuilt_upload $FLAGS_FALSE "Upload prebuilt binary packages." DEFINE_boolean remove_dev $FLAGS_TRUE "Remove the de image during archive." +DEFINE_string set_version "" "Set version/change identifier." DEFINE_string to "$DEFAULT_TO" "Directory of build archive" DEFINE_string zipname "image.zip" "Name of zip file to create." DEFINE_string useflags "" "USE flags to pass into mod_image_* and build_image." @@ -132,7 +133,9 @@ REVISION=${REVISION:0:8} # Use the version number plus revision as the last change. (Need both, since # trunk builds multiple times with the same version string.) LAST_CHANGE="${CHROMEOS_VERSION_STRING}-r${REVISION}" -if [ -n "$FLAGS_build_number" ]; then +if [ -n "$FLAGS_set_version" ]; then + LAST_CHANGE="$FLAGS_set_version" +elif [ -n "$FLAGS_build_number" ]; then LAST_CHANGE="$LAST_CHANGE-b${FLAGS_build_number}" fi