Created
October 16, 2017 20:16
-
-
Save andreas-nesheim/b80daca15286fabd980d8daa8183b89c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get current build number | |
build_number = get_info_plist_value( | |
key: 'CFBundleVersion', | |
path: 'path/to/projects/Info.plist' | |
) | |
# convert the build number from string to int, increment and convert back to string | |
build_number = Integer(build_number) | |
build_number += 1 | |
build_number = build_number.to_s | |
# set incremented build number | |
set_info_plist_value( | |
key: 'CFBundleVersion', | |
value: build_number, | |
path: 'path/to/projects/Info.plist' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment