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

Side by Side Diff: tools/upload_sdk.py

Issue 8933004: Remove the print statement that told the user that gsutil could not be found (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This zips the SDK and uploads it to Google Storage when run on a buildbot. 7 # This zips the SDK and uploads it to Google Storage when run on a buildbot.
8 8
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 if os.environ.has_key('DART_LOCAL_BUILD'): 62 if os.environ.has_key('DART_LOCAL_BUILD'):
63 gsdir = os.environ 63 gsdir = os.environ
64 else: 64 else:
65 gsdir = GS_DIR 65 gsdir = GS_DIR
66 66
67 if not os.path.exists(argv[1]): 67 if not os.path.exists(argv[1]):
68 sys.stderr.write('Path not found: %s\n' % argv[1]) 68 sys.stderr.write('Path not found: %s\n' % argv[1])
69 Usage(argv[0]) 69 Usage(argv[0])
70 return 1 70 return 1
71 if not os.path.exists(GSUTIL): 71 if not os.path.exists(GSUTIL):
72 sys.stderr.write('cound not find {0}'.format(GSUTIL)) 72 #TODO: Determine where we are running, if we're running on a buildbot we
73 #should fail with a message.
74 #If we are not on a buildbot then fail silently.
73 exit(0) 75 exit(0)
74 revision = GetSVNRevision() 76 revision = GetSVNRevision()
75 if revision is None: 77 if revision is None:
76 sys.stderr.write('Unable to find SVN revision.\n') 78 sys.stderr.write('Unable to find SVN revision.\n')
77 return 1 79 return 1
78 os.chdir(argv[1]) 80 os.chdir(argv[1])
79 # TODO(dgrove) - deal with architectures that are not ia32. 81 # TODO(dgrove) - deal with architectures that are not ia32.
80 sdk_name = 'dart-' + utils.GuessOS() + '-' + revision + '.zip' 82 sdk_name = 'dart-' + utils.GuessOS() + '-' + revision + '.zip'
81 sdk_file = '../' + sdk_name 83 sdk_file = '../' + sdk_name
82 ExecuteCommand(['zip', '-yr', sdk_file, '.']) 84 ExecuteCommand(['zip', '-yr', sdk_file, '.'])
83 UploadArchive(sdk_file, GS_SITE + os.path.join(gsdir, SDK, sdk_name)) 85 UploadArchive(sdk_file, GS_SITE + os.path.join(gsdir, SDK, sdk_name))
84 latest_name = 'dart-' + utils.GuessOS() + '-latest' + '.zip' 86 latest_name = 'dart-' + utils.GuessOS() + '-latest' + '.zip'
85 UploadArchive(sdk_file, GS_SITE + os.path.join(gsdir, SDK, latest_name)) 87 UploadArchive(sdk_file, GS_SITE + os.path.join(gsdir, SDK, latest_name))
86 88
87 89
88 if __name__ == '__main__': 90 if __name__ == '__main__':
89 sys.exit(main(sys.argv)) 91 sys.exit(main(sys.argv))
90 92
91 93
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698