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

Unified Diff: editor/build/build.py

Issue 8923007: Changed upload_sdk.py to handle local builds (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 | « no previous file | tools/upload_sdk.py » ('j') | tools/upload_sdk.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/build/build.py
===================================================================
--- editor/build/build.py (revision 2354)
+++ editor/build/build.py (working copy)
@@ -239,15 +239,30 @@
' tried environment variables'
' USER and USERNAME')
return 1
+ sdk_environment = os.environ
if username.startswith('chrome'):
to_bucket = 'gs://dart-editor-archive-continuous'
+ run_sdk_build = True
+ running_on_buildbot = True
else:
to_bucket = 'gs://dart-editor-archive-testing'
+ run_sdk_build = False
+ running_on_buildbot = False
+ sdk_environment['DART_LOCAL_BUILD'] = 'dart-editor-archive-testing'
+ #this is a hack to allow the SDK build to be run on a local machine
+ if sdk_environment.has_key('FORCE_RUN_SDK_BUILD'):
+ run_sdk_build = True
+ #end hack
+
print '@@@BUILD_STEP dart-ide dart clients: %s@@@' % options.name
+ if sdk_environment.has_key('JAVA_HOME'):
+ print 'JAVA_HOME = {0}'.format(str(sdk_environment['JAVA_HOME']))
builder_name = str(options.name)
- if builder_name != 'dart-editor-win' and builder_name != 'dart-editor':
+ if (run_sdk_build and
+ builder_name != 'dart-editor-win'
+ and builder_name != 'dart-editor'):
_PrintSeparator('running the build of the Dart SDK')
dartbuildscript = os.path.join(toolspath, 'build.py')
cmds = [sys.executable, dartbuildscript,
@@ -256,16 +271,16 @@
try:
os.chdir(dartpath)
print ' '.join(cmds)
- status = subprocess.call(cmds)
+ status = subprocess.call(cmds, env=sdk_environment)
print 'sdk build returned ' + str(status)
if status:
_PrintError('the build of the SDK failed')
return status
finally:
os.chdir(cwd)
+ if running_on_buildbot:
+ _CopySdk(buildos, revision, to_bucket, gsu)
- _CopySdk(buildos, revision, to_bucket, gsu)
-
if builder_name == 'dart-editor':
buildos = None
else:
@@ -305,7 +320,9 @@
return status
_PrintSeparator("Setting the ACL'sfor the RCP's in Google Storage")
- _SetAclOnArtifacts(to_bucket, [revision, 'latest'], gsu)
+ _SetAclOnArtifacts(to_bucket,
+ [revision + '/DartBuild', 'latest/DartBuild'],
+ gsu)
sys.stdout.flush()
@@ -472,26 +489,26 @@
gsu.SetAcl(element, acl)
-def _CopySdk(buildos, revision, bucket, gsu):
+def _CopySdk(buildos, revision, bucket_to, gsu):
"""copy the deployed SDK to the editor buckets.
Args:
buildos: the OS the build is running under
revision: the svn revision
- bucket: the bucket to upload to
+ bucket_to: the bucket to upload to
gsu: the gsutil object
"""
print '_CopySdk({0}, {1}, gsu)'.format(buildos, revision)
gszip = 'dart-{0}-{1}.zip'.format(buildos, revision)
gssdkzip = 'gs://dart-dump-render-tree/sdk/{0}'.format(gszip)
- gseditorzip = '{0}/{1}/{2}'.format(bucket, revision, gszip)
- gseditorlatestzip = '{0}/{1}/{2}'.format(bucket, 'latest', gszip)
+ gseditorzip = '{0}/{1}/{2}'.format(bucket_to, revision, gszip)
+ gseditorlatestzip = '{0}/{1}/{2}'.format(bucket_to, 'latest', gszip)
print 'copying {0} to {1}'.format(gssdkzip, gseditorzip)
gsu.Copy(gssdkzip, gseditorzip)
print 'copying {0} to {1}'.format(gssdkzip, gseditorlatestzip)
gsu.Copy(gssdkzip, gseditorlatestzip)
- _SetAclOnArtifacts(bucket, [gszip], gsu)
+ _SetAclOnArtifacts(bucket_to, [gszip], gsu)
def _PrintSeparator(text):
« no previous file with comments | « no previous file | tools/upload_sdk.py » ('j') | tools/upload_sdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698