17URL =
'https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-darwin-amd64'
18SHA256 =
'3cf03dab8f5ef7c29e354b8e9293c82098ace3634253f9c660c26168b9e34720'
20BINARY = URL.split(
'/')[-1]
24 """Create the asset."""
25 target_file = os.path.join(target_dir,
'bazelisk')
26 subprocess.call([
'wget',
'--quiet',
'--output-document', target_file, URL])
27 output = subprocess.check_output([
'sha256sum', target_file], encoding=
'utf-8')
28 actual_hash = output.split(
' ')[0]
29 if actual_hash != SHA256:
30 raise Exception(
'SHA256 does not match (%s != %s)' % (actual_hash, SHA256))
31 subprocess.call([
'chmod',
'ugo+x', target_file])
35 parser = argparse.ArgumentParser()
36 parser.add_argument(
'--target_dir',
'-t', required=
True)
37 args = parser.parse_args()
41if __name__ ==
'__main__':
def create_asset(chrome_src_path, browser_executable, target_dir, upload_to_partner_bucket, dm_path)