in annotated_steps.py [0:0]
def GetSDK(bot_info):
with BuildStep('Get sdk'):
namer = bot_utils.GCSNamer(channel=bot_utils.Channel.DEV)
# TODO(ricow): Be smarter here, only download if new.
build_root = GetBuildRoot(bot_info)
SafeDelete(os.path.join(build_root, 'dart-sdk'), bot_info)
if not os.path.exists(build_root):
os.makedirs(build_root)
local_zip = os.path.join(build_root, 'sdk.zip')
gsutils = bot_utils.GSUtil()
gsutils.execute(['cp',
namer.sdk_zipfilepath('latest', bot_info.system,
'ia32', 'release'),
local_zip])
if bot_info.system == 'windows':
with zipfile.ZipFile(local_zip, 'r') as zip_file:
zip_file.extractall(path=build_root)
else:
# We don't keep the execution bit if we use python's zipfile on posix.
RunProcess(['unzip', local_zip, '-d', build_root])
pub = GetPub(bot_info)
RunProcess([pub, '--version'])