import argparse, datetime info = r""" BuildMachineOSBuild 19B88 CFBundleDevelopmentRegion English CFBundleExecutable love CFBundleIconFile iconfile CFBundleIdentifier org.love2d.MrZ.Techmino CFBundleInfoDictionaryVersion 6.0 CFBundleName Techmino CFBundlePackageType APPL CFBundleShortVersionString %s CFBundleSignature LoVe CFBundleSupportedPlatforms MacOSX DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild 11C504 DTPlatformVersion GM DTSDKBuild 19B90 DTSDKName macosx10.15 DTXcode 1130 DTXcodeBuild 11C504 LSApplicationCategoryType public.app-category.games LSMinimumSystemVersion 10.7 NSHighResolutionCapable NSHumanReadableCopyright ©2020-%d 26F Studio, GNU LGPLv3.0 NSPrincipalClass NSApplication NSSupportsAutomaticGraphicsSwitching """ if __name__ == '__main__': parser = argparse.ArgumentParser(description="用于CI更新macOS版本号") parser.add_argument("-N", "--Name", type=str, help = "versionName") args = parser.parse_args() with open("Techmino.app/Contents/info.plist", "w") as file: file.write(info % (args.Name, datetime.datetime.today().year))