Skip to content

Instantly share code, notes, and snippets.

@trdwll
Last active June 2, 2021 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trdwll/c65fa5797f687ec9b47fa21212c0e09a to your computer and use it in GitHub Desktop.
Save trdwll/c65fa5797f687ec9b47fa21212c0e09a to your computer and use it in GitHub Desktop.
UEVersionChanger (ini)
import configparser
import sys
import argparse
def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument('Workspace', help='The path to the project that you\'re wanting to use!')
parser.add_argument('NewVersion', help='The new version to set for the project.')
args = parser.parse_args()
config_file = args.Workspace + '/Config/DefaultGame.ini'
config = configparser.ConfigParser()
config.optionxform=str
config.read(config_file)
config['/Script/EngineSettings.GeneralProjectSettings']['ProjectVersion'] = args.NewVersion
with open(config_file, 'w') as configfile:
config.write(configfile)
if __name__ == "__main__":
main(sys.argv[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment