Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Unified Diff: scripts/slave/zip_build.py

Issue 2112413002: Allowing zip_build to use a file name given in build_url. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Untouching blank line. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/recipe_modules/archive/example.expected/zip_and_upload_custom_location.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/zip_build.py
diff --git a/scripts/slave/zip_build.py b/scripts/slave/zip_build.py
index 2541e8b3b818d9d016689efd39180b34cadf9e44..ec642e6a3222d0d42c24e6ef1d9c73c4887548f9 100755
--- a/scripts/slave/zip_build.py
+++ b/scripts/slave/zip_build.py
@@ -199,6 +199,12 @@ def MakeVersionedArchive(zip_file, file_suffix, options):
zip_base, zip_ext = os.path.splitext(zip_template)
# Create a versioned copy of the file.
versioned_file = zip_file.replace(zip_ext, file_suffix + zip_ext)
+ # Allow for overriding the name of the file based on the given upload url.
+ if options.use_build_url_name:
+ new_build_url, new_archive_name = options.build_url.rsplit('/', 1)
+ if new_archive_name and new_archive_name.endswith('.zip'):
+ options.build_url = new_build_url
+ versioned_file = zip_file.replace(zip_template, new_archive_name)
if os.path.exists(versioned_file):
# This file already exists. Maybe we are doing a clobber build at the same
# revision. We can move this file away.
@@ -433,6 +439,9 @@ def main(argv):
option_parser.add_option('--build-url', default='',
help=('Optional URL to which to upload build '
'(overrides build_url factory property)'))
+ option_parser.add_option('--use-build-url-name', action='store_true',
+ help=('Use the filename given in --build-url instead'
+ 'of generating one.'))
option_parser.add_option('--cros-board',
help=('If building for Chrom[e|ium]OS via the '
'simple chrome workflow, the name of the '
« no previous file with comments | « scripts/slave/recipe_modules/archive/example.expected/zip_and_upload_custom_location.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698