Skip to content

Commit 6d3b06d

Browse files
committed
ci: updated Fastfile to bump versionCode to highest+1 of all tracks
1 parent 7a712ba commit 6d3b06d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

fastlane/Fastfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,16 @@ platform :android do
3232

3333
desc "Update versionCode to be one higher than the latest on Play Store"
3434
lane :update_version do
35+
gp = google_play_track_version_codes(track: 'production')
36+
gb = google_play_track_version_codes(track: 'beta')
37+
ga = google_play_track_version_codes(track: 'alpha')
38+
gi = google_play_track_version_codes(track: 'internal')
39+
max_value = [gp[0].to_i, gb[0].to_i, ga[0].to_i, gi[0].to_i].max
40+
version_updated = max_value + 1
41+
3542
increment_version_code(
3643
gradle_file_path: "mobile/build.gradle",
37-
version_code: google_play_track_version_codes.max + 1
44+
version_code: version_updated
3845
)
3946
end
4047

0 commit comments

Comments
 (0)