Skip to content

Commit e308a45

Browse files
committed
feat: automatically get android version code from firebase
1 parent 8bc28ae commit e308a45

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

projects/SlackClone/fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ platform :android do
111111
gradle_file_path:"./android/app/build.gradle",
112112
version_name: package["version"] + version_name_addition
113113
)
114+
latest_app_distribution_release = firebase_app_distribution_get_latest_release(
115+
app: "1:296557120037:android:13ccb281a7750765f60dcc"
116+
)
117+
latest_app_distribution_version_code = latest_app_distribution_release[:buildVersion].to_i
118+
increment_version_code(
119+
gradle_file_path:"./android/app/build.gradle",
120+
version_code: latest_app_distribution_version_code + 1
121+
)
114122
gradle(
115123
project_dir: "./android",
116124
tasks: ["clean", "assembleRelease"]

projects/WhatsAppClone/fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ platform :android do
113113
gradle_file_path:"./android/app/build.gradle",
114114
version_name: package["version"] + version_name_addition
115115
)
116+
latest_app_distribution_release = firebase_app_distribution_get_latest_release(
117+
app: "1:296557120037:android:c200ee23e884e68ef60dcc"
118+
)
119+
latest_app_distribution_version_code = latest_app_distribution_release[:buildVersion].to_i
120+
increment_version_code(
121+
gradle_file_path:"./android/app/build.gradle",
122+
version_code: latest_app_distribution_version_code + 1
123+
)
116124
gradle(
117125
project_dir: "./android",
118126
tasks: ["clean", "assembleRelease"]

projects/iMessageClone/fastlane/Fastfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ platform :android do
113113
gradle_file_path:"./android/app/build.gradle",
114114
version_name: package["version"] + version_name_addition
115115
)
116+
latest_app_distribution_release = firebase_app_distribution_get_latest_release(
117+
app: "1:296557120037:android:a96d3423171fce2af60dcc"
118+
)
119+
latest_app_distribution_version_code = latest_app_distribution_release[:buildVersion].to_i
120+
increment_version_code(
121+
gradle_file_path:"./android/app/build.gradle",
122+
version_code: latest_app_distribution_version_code + 1
123+
)
116124
gradle(
117125
project_dir: "./android",
118126
tasks: ["clean", "assembleRelease"]

0 commit comments

Comments
 (0)