refactor: user_error fn

This commit is contained in:
Malo Léon 2023-05-15 19:34:10 +02:00
parent 27917a1f81
commit a9557fbc51
3 changed files with 11 additions and 11 deletions

View File

@ -7,7 +7,7 @@ module Fastlane
def self.run(params) def self.run(params)
# Check parameters # Check parameters
unless Helper::AndroidCdHelper.is_set(params[:beta_type]) unless Helper::AndroidCdHelper.is_set(params[:beta_type])
UI.user_error("❌ Parameters beta_type cannot be null") UI.user_error!("❌ Parameters beta_type cannot be null")
puts("Error on beta type parameter") puts("Error on beta type parameter")
end end
@ -30,7 +30,7 @@ module Fastlane
properties: { properties: {
"android.injected.version.code" => build_number "android.injected.version.code" => build_number
} }
)) )
# Upload the Android App Bundle to the Play Store # Upload the Android App Bundle to the Play Store
other_action.upload_to_play_store( other_action.upload_to_play_store(

View File

@ -7,12 +7,12 @@ module Fastlane
def self.run(params) def self.run(params)
# Check from parameters # Check from parameters
unless Helper::AndroidCdHelper.is_set(params[:from]) unless Helper::AndroidCdHelper.is_set(params[:from])
UI.user_error("❌ Parameters from cannot be null") UI.user_error!("❌ Parameters from cannot be null")
end end
# Check destination parameters # Check destination parameters
unless Helper::AndroidCdHelper.is_set(params[:destination]) unless Helper::AndroidCdHelper.is_set(params[:destination])
UI.user_error("❌ Parameters destination cannot be null") UI.user_error!("❌ Parameters destination cannot be null")
end end
UI.message("⌛️ Promoting to Google Play Store from #{params[:from]} to #{params[:destination]}..") UI.message("⌛️ Promoting to Google Play Store from #{params[:from]} to #{params[:destination]}..")

View File

@ -17,7 +17,7 @@ module Fastlane
# Move the extracted files to the current directory # Move the extracted files to the current directory
`jar xvf #{android_directory} && mv #{android_directory}/android_keys/* #{android_directory}` `jar xvf #{android_directory} && mv #{android_directory}/android_keys/* #{android_directory}`
else else
UI.user_error("❌ Erreur lors de la décompression du fichier GPG") UI.user_error!("❌ Erreur lors de la décompression du fichier GPG")
end end
end end