refactor: user_error fn
This commit is contained in:
parent
76723e2185
commit
a4f0010170
@ -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
|
||||||
|
|
||||||
@ -24,13 +24,13 @@ module Fastlane
|
|||||||
|
|
||||||
# Build the Android App Bundle
|
# Build the Android App Bundle
|
||||||
other_action.gradle(
|
other_action.gradle(
|
||||||
task: "bundle",
|
task: "bundle",
|
||||||
build_type: "Release",
|
build_type: "Release",
|
||||||
print_command: true,
|
print_command: true,
|
||||||
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(
|
||||||
|
@ -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]}..")
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user