Created
February 22, 2021 10:50
-
-
Save lukebrandonfarrell/18860f9e88b099b77ef137068e945d5b to your computer and use it in GitHub Desktop.
Gets the latest Google Play version code using Fastlane google_play_track_version_codes
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
def latest_googleplay_version_code | |
productionVersionCodes = google_play_track_version_codes(track: 'production') | |
betaVersionCodes = google_play_track_version_codes(track: 'beta') | |
alphaVersionCodes = google_play_track_version_codes(track: 'alpha') | |
internalVersionCodes = google_play_track_version_codes(track: 'internal') | |
# puts version codes from all tracks into the same array | |
versionCodes = [ | |
productionVersionCodes, | |
betaVersionCodes, | |
alphaVersionCodes, | |
internalVersionCodes | |
].reduce([], :concat) | |
# returns the highest version code from array | |
return versionCodes.max | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: