def EmitLongVersionFunc(target): """Emit version information to the target file.""" versionStr = open_gee_version.get_long() with open(target, 'w') as fp: fp.write(versionStr)
def EmitVersionHeaderFunc(target): """Emit version information to the target file.""" versionStr = open_gee_version.get_short() longVersionStr = open_gee_version.get_long() fp = open(target, 'w') fp.writelines([ '// DO NOT MODIFY - auto-generated file\n', 'extern const char *const GEE_VERSION = "' + versionStr + '";\n', 'extern const char *const GEE_LONG_VERSION = "' + longVersionStr + '";\n' ]) fp.close()