8Copies the Info.plist and adds extra fields to it like the git hash of the
11usage: copy_info_plist.py --source <src_path> --destination <dest_path>
12 --minversion=<deployment_target>
21_script_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..'))
22_src_root_dir = os.path.join(_script_dir, '..', '..')
25def get_clang_version():
26 clang_executable = str(
27 os.path.join(_src_root_dir, 'flutter',
'buildtools',
'mac-x64',
'clang',
'bin',
'clang++')
29 version = subprocess.check_output([clang_executable,
'--version'])
30 return version.splitlines()[0]
35 parser = argparse.ArgumentParser(
36 description=
'Copies the Info.plist and adds extra fields to it like the '
37 'git hash of the engine'
41 '--source', help=
'Path to Info.plist source template', type=str, required=
True
44 '--destination', help=
'Path to destination Info.plist', type=str, required=
True
46 parser.add_argument(
'--minversion', help=
'Minimum device OS version like "9.0"', type=str)
48 args = parser.parse_args()
50 text = open(args.source).
read()
51 engine_path = os.path.join(_src_root_dir,
'flutter')
54 text = text.format(revision=revision, clang_version=clang_version, min_version=args.minversion)
56 with open(args.destination,
'w')
as outfile:
60if __name__ ==
'__main__':
static bool read(SkStream *stream, void *buffer, size_t amount)
def get_repository_version(repository)