Created
December 1, 2021 17:01
-
-
Save shafayathossain/3cea4bad6126c369d14125f84865374f to your computer and use it in GitHub Desktop.
Responsible for fetching version code from play console and incrementing version code.
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
desc "Responsible for fetching version code from play console and incrementing version code." | |
lane :increment_version_code_in_project_gradle do | |
version_code_from_play_store_strings = google_play_track_version_codes( | |
package_name: PACKAGE_NAME, # PACKAGE_NAME is a global variable defined earlier | |
track: "production", # this can be alpha, beta etc. | |
json_key: PLAYSTORE_KEY_PATH, | |
) | |
version_code_from_play_store = version_code_from_play_store_strings[0].to_i | |
UPDATED_VERSION_CODE = version_code_from_play_store + 1 | |
increment_version_code( | |
gradle_file_path: Dir.pwd + "/../app/build.gradle", | |
version_code: UPDATED_VERSION_CODE.to_i | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment