Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
win_toolchain.create_and_upload Namespace Reference

Functions

 main ()
 

Variables

 FILE_DIR = os.path.dirname(os.path.abspath(__file__))
 
 ASSET = os.path.basename(FILE_DIR)
 

Detailed Description

Create the asset and upload it.

Function Documentation

◆ main()

win_toolchain.create_and_upload.main ( )

Definition at line 24 of file create_and_upload.py.

24def main():
25 parser = argparse.ArgumentParser()
26 parser.add_argument('--src_dir', '-s', required=True)
27 args = parser.parse_args()
28 # Pass src_dir to the creation script via an environment variable, since
29 # we're calling the script via `sk` and not directly.
30 os.environ[create.ENV_VAR] = args.src_dir
31
32 sk = os.path.realpath(os.path.join(
33 FILE_DIR, os.pardir, os.pardir, os.pardir, os.pardir, 'bin', 'sk'))
34 if os.name == 'nt':
35 sk += '.exe'
36 if not os.path.isfile(sk):
37 raise Exception('`sk` not found at %s; maybe you need to run bin/fetch-sk?')
38
39 # Upload the asset.
40 subprocess.check_call([sk, 'asset', 'upload', ASSET], cwd=FILE_DIR)
41
42
Definition main.py:1

Variable Documentation

◆ ASSET

win_toolchain.create_and_upload.ASSET = os.path.basename(FILE_DIR)

Definition at line 21 of file create_and_upload.py.

◆ FILE_DIR

win_toolchain.create_and_upload.FILE_DIR = os.path.dirname(os.path.abspath(__file__))

Definition at line 20 of file create_and_upload.py.