14 parser = argparse.ArgumentParser(
15 description=
'A script to write the version string to a file')
18 '--output',
'-o', type=str, required=
True, help=
'File to write')
19 parser.add_argument(
'--no-git-hash',
20 help=
'Omit the git hash in the output',
24 return parser.parse_args(args)
30 with open(args.output,
'w')
as versionFile:
31 versionFile.write(version +
'\n')
35if __name__ ==
'__main__':
36 sys.exit(
Main(sys.argv))
def GetVersion(no_git_hash=False, version_file=None, git_revision_file=None)