import datetime import getVersion 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 """ versionCode, versionName = getVersion.getVersion() print("Updating to", versionName) with open("Techmino.app/Contents/info.plist", "w") as file: file.write(info % (versionName, datetime.datetime.today().year))