Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
parser = _ParseOptions()
(options, args) = parser.parse_args()
# Determine which targets to build. By default we build the "all" target.
if args:
print 'only options should be passed to this script'
parser.print_help()
return 1
revision = options.revision
src_rev = options.srcrev
gsu = gsutil.GsUtil(running_on_buildbot=False)
elements = ['DartBuild-linux.gtk.x86_64.zip',
'DartBuild-linux.gtk.x86.zip',
'DartBuild-macosx.cocoa.x86_64.zip',
'DartBuild-macosx.cocoa.x86.zip',
'DartBuild-win32.win32.x86_64.zip',
'DartBuild-win32.win32.x86.zip',
'dart-editor-linux.gtk.x86_64.zip',
'dart-editor-linux.gtk.x86.zip',
'dart-editor-macosx.cocoa.x86_64.zip',
'dart-editor-macosx.cocoa.x86.zip',
'dart-editor-win32.win32.x86_64.zip',
'dart-editor-win32.win32.x86.zip']
os_names = []
re_filename = re.compile(
r'^(dart-editor|DartBuild)-(\w.+)\.(\w.+)\.(\w+)\.zip')
for element in elements:
% (builder_name, EDITOR_REGEXP))
CHANNEL = match.groupdict()['channel'] or 'be'
SYSTEM = match.groupdict()['system']
BUILD_INSTALLER = bool(match.groupdict()['installer'])
PLUGINS_BUILD = SYSTEM is None
REVISION = revision
# Make sure the buildername and the options agree
assert BUILD_INSTALLER == options.build_installer
running_on_buildbot = username.startswith('chrome')
homegsutil = join(DART_PATH, 'third_party', 'gsutil', 'gsutil')
gsu = gsutil.GsUtil(False, homegsutil,
running_on_buildbot=running_on_buildbot)
def build_installer():
release_type = bot_utils.ReleaseType.SIGNED
if CHANNEL == 'be':
# We don't have signed bits on bleeding_edge, so we take the unsigned
# editor.
release_type = bot_utils.ReleaseType.RAW
if SYSTEM == 'win':
# The windows installer will use unsigned *.exe files to avoid going
# through two rounds of signing.
release_type = bot_utils.ReleaseType.RAW
def editor_location(arch):
namer = bot_utils.GCSNamer(CHANNEL, release_type)
editor_path = namer.editor_zipfilepath(REVISION, SYSTEM, arch)