9"""Create the asset and upload it."""
20FILE_DIR = os.path.dirname(os.path.abspath(__file__))
21ASSET = os.path.basename(FILE_DIR)
25 if 'linux' not in sys.platform:
26 print(
'This script only runs on Linux.', file=sys.stderr)
28 parser = argparse.ArgumentParser()
29 parser.add_argument(
'--lib_path',
'-l', required=
True)
30 args = parser.parse_args()
33 os.environ[create.ENV_VAR] = args.lib_path
35 sk = os.path.realpath(os.path.join(
36 FILE_DIR, os.pardir, os.pardir, os.pardir, os.pardir,
'bin',
'sk'))
39 if not os.path.isfile(sk):
40 raise Exception(
'`sk` not found at %s; maybe you need to run bin/fetch-sk?')
43 subprocess.check_call([sk,
'asset',
'upload', ASSET], cwd=FILE_DIR)
46if __name__ ==
'__main__':
def print(*args, **kwargs)