17URL =
'https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64'
18SHA256 =
'61699e22abb2a26304edfa1376f65ad24191f94a4ffed68a58d42b6fee01e124'
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(target_dir)