Flutter Engine
The Flutter Engine
Functions | Variables
create_and_upload Namespace Reference

Functions

def main ()
 

Variables

 FILE_DIR = os.path.dirname(os.path.abspath(__file__))
 
 INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))
 
 ASSET = os.path.basename(FILE_DIR)
 

Function Documentation

◆ main()

def create_and_upload.main ( )

Definition at line 23 of file create_and_upload.py.

23def main():
24 parser = argparse.ArgumentParser()
25 parser.add_argument('--gsutil')
26 args = parser.parse_args()
27
28 with utils.tmp_dir():
29 cwd = os.getcwd()
30 create_script = os.path.join(FILE_DIR, 'create.py')
31 upload_script = os.path.join(FILE_DIR, 'upload.py')
32
33 try:
34 subprocess.check_call(['python', create_script, '-t', cwd])
35 cmd = ['python', upload_script, '-t', cwd]
36 if args.gsutil:
37 cmd.extend(['--gsutil', args.gsutil])
38 subprocess.check_call(cmd)
39 except subprocess.CalledProcessError:
40 # Trap exceptions to avoid printing two stacktraces.
41 sys.exit(1)
42
43

Variable Documentation

◆ ASSET

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

Definition at line 19 of file create_and_upload.py.

◆ FILE_DIR

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

Definition at line 17 of file create_and_upload.py.

◆ INFRA_BOTS_DIR

create_and_upload.INFRA_BOTS_DIR = os.path.realpath(os.path.join(FILE_DIR, os.pardir, os.pardir))

Definition at line 18 of file create_and_upload.py.