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

Side by Side Diff: editor/build/build.py

Issue 343653009: Add archiving of android zip files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/bots/bot_utils.py » ('j') | 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 import glob 7 import glob
8 import gsutil 8 import gsutil
9 import imp 9 import imp
10 import optparse 10 import optparse
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 DartArchiveFile(sdk32_zip, path32, create_md5sum=True) 93 DartArchiveFile(sdk32_zip, path32, create_md5sum=True)
94 DartArchiveFile(sdk64_zip, path64, create_md5sum=True) 94 DartArchiveFile(sdk64_zip, path64, create_md5sum=True)
95 95
96 def DartArchiveUploadAPIDocs(api_zip): 96 def DartArchiveUploadAPIDocs(api_zip):
97 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) 97 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
98 for revision in [REVISION, 'latest']: 98 for revision in [REVISION, 'latest']:
99 destination = (namer.apidocs_directory(revision) + '/' + 99 destination = (namer.apidocs_directory(revision) + '/' +
100 namer.apidocs_zipfilename()) 100 namer.apidocs_zipfilename())
101 DartArchiveFile(api_zip, destination, create_md5sum=False) 101 DartArchiveFile(api_zip, destination, create_md5sum=False)
102 102
103 def DartArchiveUploadAndroidZip(android_zip):
104 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
105 for revision in [REVISION, 'latest']:
106 destination = namer.editor_android_zipfilepath(revision)
107 DartArchiveFile(android_zip, destination, create_md5sum=False)
108
103 def DartArchiveUploadVersionFile(version_file): 109 def DartArchiveUploadVersionFile(version_file):
104 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW) 110 namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
105 for revision in [REVISION, 'latest']: 111 for revision in [REVISION, 'latest']:
106 DartArchiveFile(version_file, namer.version_filepath(revision), 112 DartArchiveFile(version_file, namer.version_filepath(revision),
107 create_md5sum=False) 113 create_md5sum=False)
108 114
109 def DartArchiveUploadInstaller( 115 def DartArchiveUploadInstaller(
110 arch, installer_file, extension, release_type=bot_utils.ReleaseType.RAW): 116 arch, installer_file, extension, release_type=bot_utils.ReleaseType.RAW):
111 namer = bot_utils.GCSNamer(CHANNEL, release_type) 117 namer = bot_utils.GCSNamer(CHANNEL, release_type)
112 gsu_path = namer.editor_installer_filepath( 118 gsu_path = namer.editor_installer_filepath(
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 # dart-editor-linux.gtk.x86.zip --> darteditor-linux-32.zip 555 # dart-editor-linux.gtk.x86.zip --> darteditor-linux-32.zip
550 RenameRcpZipFiles(buildout) 556 RenameRcpZipFiles(buildout)
551 557
552 PostProcessEditorBuilds(buildout, buildos) 558 PostProcessEditorBuilds(buildout, buildos)
553 559
554 if running_on_buildbot: 560 if running_on_buildbot:
555 version_file = _FindVersionFile(buildout) 561 version_file = _FindVersionFile(buildout)
556 if version_file: 562 if version_file:
557 DartArchiveUploadVersionFile(version_file) 563 DartArchiveUploadVersionFile(version_file)
558 564
565 # Archive the android editor zip file
566 if builder_name.startswith('dart-editor-linux'):
567 UploadAndroidZip()
568
559 found_zips = _FindRcpZipFiles(buildout) 569 found_zips = _FindRcpZipFiles(buildout)
560 for zipfile in found_zips: 570 for zipfile in found_zips:
561 DartArchiveUploadEditorZipFile(zipfile) 571 DartArchiveUploadEditorZipFile(zipfile)
562 572
563 return 0 573 return 0
564 574
565 if BUILD_INSTALLER: 575 if BUILD_INSTALLER:
566 build_installer() 576 build_installer()
567 else: 577 else:
568 build_editor(sdk_zip) 578 build_editor(sdk_zip)
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 CallBuildScript('release', 'ia32', 'docgen') 1092 CallBuildScript('release', 'ia32', 'docgen')
1083 1093
1084 UploadApiDocs(apidir) 1094 UploadApiDocs(apidir)
1085 1095
1086 api_zip = join(buildLocation, 'dart-api-docs.zip') 1096 api_zip = join(buildLocation, 'dart-api-docs.zip')
1087 1097
1088 CreateZip(apidir, api_zip) 1098 CreateZip(apidir, api_zip)
1089 1099
1090 DartArchiveUploadAPIDocs(api_zip) 1100 DartArchiveUploadAPIDocs(api_zip)
1091 1101
1102 def UploadAndroidZip():
1103 android_zip = join(DART_PATH,
1104 utils.GetBuildRoot(BUILD_OS, 'release', 'ia32'),
1105 'editor', 'android.zip')
1106 DartArchiveUploadAndroidZip(andrid_zip)
1107
1092 1108
1093 def CreateSDK(sdkpath): 1109 def CreateSDK(sdkpath):
1094 """Create the dart-sdk's for the current OS""" 1110 """Create the dart-sdk's for the current OS"""
1095 1111
1096 if BUILD_OS == 'linux': 1112 if BUILD_OS == 'linux':
1097 return CreateLinuxSDK(sdkpath) 1113 return CreateLinuxSDK(sdkpath)
1098 if BUILD_OS == 'macos': 1114 if BUILD_OS == 'macos':
1099 return CreateMacosSDK(sdkpath) 1115 return CreateMacosSDK(sdkpath)
1100 if BUILD_OS == 'win32': 1116 if BUILD_OS == 'win32':
1101 return CreateWin32SDK(sdkpath) 1117 return CreateWin32SDK(sdkpath)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 def FileDelete(f): 1266 def FileDelete(f):
1251 """delete the given file - do not re-throw any exceptions that occur""" 1267 """delete the given file - do not re-throw any exceptions that occur"""
1252 if os.path.exists(f): 1268 if os.path.exists(f):
1253 try: 1269 try:
1254 os.remove(f) 1270 os.remove(f)
1255 except OSError: 1271 except OSError:
1256 print 'error deleting %s' % f 1272 print 'error deleting %s' % f
1257 1273
1258 if __name__ == '__main__': 1274 if __name__ == '__main__':
1259 sys.exit(main()) 1275 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/bots/bot_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698