Unverified Commit eaa9b47a authored by xster's avatar xster Committed by GitHub

Add version collition error handling for Android publish (#14835)

parent 44592238
...@@ -9,6 +9,7 @@ default_platform(:android) ...@@ -9,6 +9,7 @@ default_platform(:android)
platform :android do platform :android do
desc 'Push the built release APK to alpha or beta depending on current branch' desc 'Push the built release APK to alpha or beta depending on current branch'
lane :deploy_play_store do lane :deploy_play_store do
begin
upload_to_play_store( upload_to_play_store(
track: ENV['TRAVIS_BRANCH'] == 'beta' ? 'beta' : 'alpha', track: ENV['TRAVIS_BRANCH'] == 'beta' ? 'beta' : 'alpha',
apk: '../build/app/outputs/apk/release/app-release.apk', apk: '../build/app/outputs/apk/release/app-release.apk',
...@@ -16,5 +17,9 @@ platform :android do ...@@ -16,5 +17,9 @@ platform :android do
skip_upload_screenshots: true, skip_upload_screenshots: true,
skip_upload_images: true skip_upload_images: true
) )
rescue => exception
raise exception unless exception.message.include?('apkUpgradeVersionConflict')
puts 'Current version already present on the Play Store. Omitting this upload.'
end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment