9"""Create the asset and upload it."""
20FILE_DIR = os.path.dirname(os.path.abspath(__file__))
21ASSET = os.path.basename(FILE_DIR)
25 parser = argparse.ArgumentParser()
26 parser.add_argument(
'--src_dir',
'-s', required=
True)
27 args = parser.parse_args()
30 os.environ[create.ENV_VAR] = args.src_dir
32 sk = os.path.realpath(os.path.join(
33 FILE_DIR, os.pardir, os.pardir, os.pardir, os.pardir,
'bin',
'sk'))
36 if not os.path.isfile(sk):
37 raise Exception(
'`sk` not found at %s; maybe you need to run bin/fetch-sk?')
40 subprocess.check_call([sk,
'asset',
'upload', ASSET], cwd=FILE_DIR)
43if __name__ ==
'__main__':