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

Unified Diff: tools/upload_sdk.py

Issue 8932009: Build and upload SDK in both debug and release. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | « tools/create_sdk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/upload_sdk.py
===================================================================
--- tools/upload_sdk.py (revision 2400)
+++ tools/upload_sdk.py (working copy)
@@ -19,6 +19,7 @@
GS_SITE = 'gs://'
GS_DIR = 'dart-dump-render-tree'
GS_SDK_DIR = 'sdk'
+SDK_LOCAL_ZIP = "dart-sdk.zip"
def ExecuteCommand(cmd):
"""Execute a command in a subprocess.
@@ -83,13 +84,20 @@
with open(os.path.join(os.path.basename(argv[1]), 'revision'), 'w') as f:
f.write(revision + '\n')
+ if (os.path.basename(os.path.dirname(argv[1])) ==
+ utils.GetBuildConf('release', 'ia32')):
+ sdk_suffix = ''
+ else:
+ sdk_suffix = '-debug'
# TODO(dgrove) - deal with architectures that are not ia32.
- sdk_file = 'dart-%s-%s.zip' % (utils.GuessOS(), revision)
- ExecuteCommand(['zip', '-yr', sdk_file, os.path.basename(argv[1])])
- UploadArchive(sdk_file,
+ sdk_file = 'dart-%s-%s%s.zip' % (utils.GuessOS(), revision, sdk_suffix)
+ if (os.path.exists(SDK_LOCAL_ZIP)):
+ os.remove(SDK_LOCAL_ZIP)
+ ExecuteCommand(['zip', '-yr', SDK_LOCAL_ZIP, os.path.basename(argv[1])])
+ UploadArchive(SDK_LOCAL_ZIP,
GS_SITE + os.path.join(gsdir, GS_SDK_DIR, sdk_file))
- latest_name = 'dart-' + utils.GuessOS() + '-latest' + '.zip'
- UploadArchive(sdk_file,
+ latest_name = 'dart-%s-latest%s.zip' % (utils.GuessOS(), sdk_suffix)
+ UploadArchive(SDK_LOCAL_ZIP,
GS_SITE + os.path.join(gsdir, GS_SDK_DIR, latest_name))
« no previous file with comments | « tools/create_sdk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698