Skip to content

Instantly share code, notes, and snippets.

@enomoto
Created January 24, 2019 08:24
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 enomoto/fdc62f27fa7ad0d6be57808174587ac9 to your computer and use it in GitHub Desktop.
Save enomoto/fdc62f27fa7ad0d6be57808174587ac9 to your computer and use it in GitHub Desktop.
This script bumps iOS app version numbers. (Python 3.7.1)
print("start")
# update version numbers
current_ver_str = '1.0.0' # 現在のバージョン番号
new_ver_str = '1.1.0' # 新しいバージョン番号
# plist file names
file_names = [
'Foo/SupportingFiles/Info.plist',
'Foo/SupportingFiles/InfoStaging.plist',
'FooModel/Info.plist',
'FooUI/Info.plist'
]
for file_name in file_names:
print(file_name)
with open(file_name, "r") as f:
filedata = f.read()
filedata = filedata.replace(current_ver_str, new_ver_str)
with open(file_name, 'w') as file:
file.write(filedata)
print("done")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment