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

Unified Diff: dart/tools/signing_script.py

Issue 68633002: Version 1.0.0.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/tools/bots/bot_utils.py ('k') | dart/utils/compiler/compiler.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/signing_script.py
===================================================================
--- dart/tools/signing_script.py (revision 30146)
+++ dart/tools/signing_script.py (working copy)
@@ -16,8 +16,6 @@
BOT_UTILS = os.path.join(DART_DIR, 'tools', 'bots', 'bot_utils.py')
BASENAME_PATTERN = 'darteditor-%(system)s-%(bits)s'
FILENAME_PATTERN = BASENAME_PATTERN + '.zip'
-BUCKET_PATTERN = (
- 'gs://dart-editor-archive-trunk/%(revision)s/' + FILENAME_PATTERN)
DRY_RUN = False
@@ -114,22 +112,6 @@
rm_tree(to_dir)
copy_tree(extracted_zipfiledir, to_dir)
-def download_from_old_location(config, destination):
- bucket = BUCKET_PATTERN % config
- run([GSUTIL, 'cp', bucket, destination])
-
-def upload_to_old_location(config, source_zip):
- if not DRY_RUN:
- bot_utils.CreateChecksumFile(
- source_zip, mangled_filename=os.path.basename(source_zip))
- md5_zip_file = source_zip + '.md5sum'
-
- bucket = BUCKET_PATTERN % config
- run([GSUTIL, 'cp', source_zip, bucket])
- run([GSUTIL, 'cp', md5_zip_file, bucket + '.md5sum'])
- run([GSUTIL, 'setacl', 'public-read', bucket])
- run([GSUTIL, 'setacl', 'public-read', bucket + '.md5sum'])
-
def download_from_new_location(channel, config, destination):
namer = bot_utils.GCSNamer(channel,
bot_utils.ReleaseType.RAW)
@@ -147,7 +129,7 @@
if not DRY_RUN:
bot_utils.CreateChecksumFile(source_zip, mangled_filename=zipfilename)
md5_zip_file = source_zip + '.md5sum'
-
+
run([GSUTIL, 'cp', source_zip, bucket])
run([GSUTIL, 'cp', md5_zip_file, bucket + '.md5sum'])
run([GSUTIL, 'setacl', 'public-read', bucket])
@@ -172,8 +154,8 @@
if len(args) > 0:
die("Invalid additional arguments: %s." % args)
- if options.channel:
- assert options.channel in bot_utils.Channel.ALL_CHANNELS
+ if not options.channel:
+ die("You need to specify a channel with --channel.")
global DRY_RUN
DRY_RUN = options.dry_run
@@ -238,10 +220,7 @@
if options.prepare:
# Download *.zip files from GCS buckets
- if options.channel:
- download_from_new_location(options.channel, config, destination)
- else:
- download_from_old_location(config, destination)
+ download_from_new_location(options.channel, config, destination)
run(['unzip', destination, '-d', destination_dir])
@@ -276,10 +255,7 @@
run(['zip', '-r9', deploy_zip_file, 'dart'])
# Upload *.zip/*.zip.md5sum and set 'public-read' ACL
- if options.channel:
- upload_to_new_location(options.channel, config, deploy_zip_file)
- else:
- upload_to_old_location(config, deploy_zip_file)
+ upload_to_new_location(options.channel, config, deploy_zip_file)
if __name__ == '__main__':
main()
« no previous file with comments | « dart/tools/bots/bot_utils.py ('k') | dart/utils/compiler/compiler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698