chore: add recommendations extensions and format files
This commit is contained in:
parent
7c1eb87726
commit
19338d2e04
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"rebornix.ruby"
|
||||||
|
]
|
||||||
|
}
|
@ -5,11 +5,10 @@ module Fastlane
|
|||||||
module Actions
|
module Actions
|
||||||
class AndroidCdAction < Action
|
class AndroidCdAction < Action
|
||||||
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.error("Parameters beta_type cannot be null")
|
UI.error("Parameters beta_type cannot be null")
|
||||||
puts "Error on beta type parameter"
|
puts("Error on beta type parameter")
|
||||||
end
|
end
|
||||||
|
|
||||||
UI.message("Building and deploying to Google Play Store in #{params[:beta_type]}")
|
UI.message("Building and deploying to Google Play Store in #{params[:beta_type]}")
|
||||||
@ -21,7 +20,7 @@ module Fastlane
|
|||||||
Fastlane::Actions.gradle(task: "clean")
|
Fastlane::Actions.gradle(task: "clean")
|
||||||
|
|
||||||
# Set the build number based on the number of commits
|
# Set the build number based on the number of commits
|
||||||
build_number = Fastlane::Actions.number_of_commits()
|
build_number = Fastlane::Actions.number_of_commits
|
||||||
|
|
||||||
# Build the Android App Bundle
|
# Build the Android App Bundle
|
||||||
Fastlane::Actions.gradle(
|
Fastlane::Actions.gradle(
|
||||||
@ -29,7 +28,7 @@ module Fastlane
|
|||||||
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
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -42,7 +41,7 @@ module Fastlane
|
|||||||
skip_upload_images: true,
|
skip_upload_images: true,
|
||||||
skip_upload_screenshots: true,
|
skip_upload_screenshots: true,
|
||||||
release_status: "draft",
|
release_status: "draft",
|
||||||
version_code: build_number,
|
version_code: build_number
|
||||||
)
|
)
|
||||||
|
|
||||||
UI.success('🍺 Successfully build & deploy appbundle to Google Play Store')
|
UI.success('🍺 Successfully build & deploy appbundle to Google Play Store')
|
||||||
@ -68,7 +67,7 @@ module Fastlane
|
|||||||
FastlaneCore::ConfigItem.new(key: :beta_type,
|
FastlaneCore::ConfigItem.new(key: :beta_type,
|
||||||
env_name: "ANDROID_CD_TEST_TYPE",
|
env_name: "ANDROID_CD_TEST_TYPE",
|
||||||
optional: false,
|
optional: false,
|
||||||
description: "Type of test (production, beta, alpha, internal)"),
|
description: "Type of test (production, beta, alpha, internal)")
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ module Fastlane
|
|||||||
module Helper
|
module Helper
|
||||||
class AndroidCdHelper
|
class AndroidCdHelper
|
||||||
def self.decrypt_android_keys(android_directory)
|
def self.decrypt_android_keys(android_directory)
|
||||||
|
|
||||||
# Define the GPG command with options
|
# Define the GPG command with options
|
||||||
gpg_command = "gpg --quiet --batch --yes --decrypt --passphrase=#{ENV['ANDROID_KEYS_SECRET_PASSPHRASE']} \
|
gpg_command = "gpg --quiet --batch --yes --decrypt --passphrase=#{ENV['ANDROID_KEYS_SECRET_PASSPHRASE']} \
|
||||||
--output #{android_directory}/android_keys.zip #{android_directory}/android_keys.zip.gpg"
|
--output #{android_directory}/android_keys.zip #{android_directory}/android_keys.zip.gpg"
|
||||||
@ -18,11 +17,11 @@ 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
|
||||||
puts "Erreur lors de la décompression du fichier GPG"
|
puts("Erreur lors de la décompression du fichier GPG")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.is_set variable
|
def self.is_set(variable)
|
||||||
str_variable = variable
|
str_variable = variable
|
||||||
str_variable = variable.strip if variable.class.to_s == "String"
|
str_variable = variable.strip if variable.class.to_s == "String"
|
||||||
variable && !(str_variable.nil? || str_variable.empty?)
|
variable && !(str_variable.nil? || str_variable.empty?)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user