parent
89732f1f3f
commit
f66ca731f8
BIN
plugins/.DS_Store
vendored
Normal file
BIN
plugins/.DS_Store
vendored
Normal file
Binary file not shown.
@ -23,17 +23,17 @@ module Fastlane
|
|||||||
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(
|
Actions(GradleAction.run(
|
||||||
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
|
||||||
Fastlane::Actions.upload_to_play_store(
|
Actions::UploadToPlayStoreAction.run(
|
||||||
track: params[:beta_type],
|
track: params[:beta_type],
|
||||||
json_key: './service_account_key.json',
|
json_key: './service_account_key.json',
|
||||||
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
aab: '../build/app/outputs/bundle/release/app-release.aab',
|
||||||
|
@ -24,7 +24,7 @@ module Fastlane
|
|||||||
|
|
||||||
# Upload the Android App Bundle to the Play Store
|
# Upload the Android App Bundle to the Play Store
|
||||||
Fastlane::Actions.upload_to_play_store(
|
Fastlane::Actions.upload_to_play_store(
|
||||||
track: params[:beta_type],
|
track: params[:from],
|
||||||
json_key: './service_account_key.json',
|
json_key: './service_account_key.json',
|
||||||
skip_upload_apk: true,
|
skip_upload_apk: true,
|
||||||
skip_upload_aab: true,
|
skip_upload_aab: true,
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
lane :test do
|
lane :test do
|
||||||
ios_cd
|
build_and_deploy(beta_type: "internal")
|
||||||
end
|
end
|
||||||
|
@ -22,10 +22,10 @@ module Fastlane
|
|||||||
UI.message(creds.to_s)
|
UI.message(creds.to_s)
|
||||||
|
|
||||||
# Ensure temporary keychain exists
|
# Ensure temporary keychain exists
|
||||||
Fastlane::Actions.ensure_temp_keychain(creds['temp_keychain_user'], creds['temp_keychain_password'])
|
Helper::IosCdHelper.ensure_temp_keychain(creds['temp_keychain_user'], creds['temp_keychain_password'])
|
||||||
|
|
||||||
# Obtain App Store Connect API key
|
# Obtain App Store Connect API key
|
||||||
api_key = Fastlane::Actions.app_store_connect_api_key(
|
api_key = Actions::AppStoreConnectApiKeyAction.run(
|
||||||
key_id: creds['apple_key_id'],
|
key_id: creds['apple_key_id'],
|
||||||
issuer_id: creds['apple_issuer_id'],
|
issuer_id: creds['apple_issuer_id'],
|
||||||
key_content: creds['apple_key_content'],
|
key_content: creds['apple_key_content'],
|
||||||
@ -34,13 +34,13 @@ module Fastlane
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Increment build number for latest TestFlight build
|
# Increment build number for latest TestFlight build
|
||||||
Fastlane::Actions.increment_build_number({
|
Actions::IncrementBuildNumberAction.run({
|
||||||
build_number: Fastlane::Actions.latest_testflight_build_number + 1,
|
build_number: Actions::LatestTestflightBuildNumberAction.run({}) + 1,
|
||||||
xcodeproj: "Runner.xcodeproj"
|
xcodeproj: "Runner.xcodeproj"
|
||||||
})
|
})
|
||||||
|
|
||||||
# Install Cocoapods
|
# Install Cocoapods
|
||||||
Fastlane::Actions.cocoapods(
|
Actions::CocoapodsAction.run(
|
||||||
clean_install: true
|
clean_install: true
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ module Fastlane
|
|||||||
# The function takes the app's bundle identifier, an authorization token for the project's Git repository, and the name and password for a temporary keychain used to store the signing certificate.
|
# The function takes the app's bundle identifier, an authorization token for the project's Git repository, and the name and password for a temporary keychain used to store the signing certificate.
|
||||||
# It uses the App Store Connect API key to access the App Store and increment the build number.
|
# It uses the App Store Connect API key to access the App Store and increment the build number.
|
||||||
# It then runs `gym` to build and sign the app using the selected provisioning profile, and finally, uses `pilot` to upload the app to TestFlight for beta testing.
|
# It then runs `gym` to build and sign the app using the selected provisioning profile, and finally, uses `pilot` to upload the app to TestFlight for beta testing.
|
||||||
Fastlane::Actions.match(
|
Actions::MatchAction.run(
|
||||||
type: 'appstore',
|
type: 'appstore',
|
||||||
app_identifier: creds['app_identifier_extensions'],
|
app_identifier: creds['app_identifier_extensions'],
|
||||||
git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]),
|
git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]),
|
||||||
@ -60,7 +60,7 @@ module Fastlane
|
|||||||
|
|
||||||
# Build and export app using Gym
|
# Build and export app using Gym
|
||||||
# Builds and packages an iOS app or framework for distribution to the App Store, TestFlight, or Enterprise distribution.
|
# Builds and packages an iOS app or framework for distribution to the App Store, TestFlight, or Enterprise distribution.
|
||||||
Fastlane::Actions.gym(
|
Actions::GymAction.run(
|
||||||
configuration: "Release",
|
configuration: "Release",
|
||||||
workspace: "Runner.xcworkspace",
|
workspace: "Runner.xcworkspace",
|
||||||
scheme: "your_schema",
|
scheme: "your_schema",
|
||||||
@ -71,7 +71,7 @@ module Fastlane
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Upload build to App Store Connect using Pilot
|
# Upload build to App Store Connect using Pilot
|
||||||
Fastlane::Actions.pilot(
|
Actions::PilotAction.run(
|
||||||
apple_id: creds['developer_app_id'].to_s,
|
apple_id: creds['developer_app_id'].to_s,
|
||||||
app_identifier: creds['developer_app_identifier'].to_s,
|
app_identifier: creds['developer_app_identifier'].to_s,
|
||||||
skip_waiting_for_build_processing: true,
|
skip_waiting_for_build_processing: true,
|
||||||
@ -81,7 +81,7 @@ module Fastlane
|
|||||||
ipa: "./Runner.ipa"
|
ipa: "./Runner.ipa"
|
||||||
)
|
)
|
||||||
|
|
||||||
Fastlane::Actions.delete_temp_keychain
|
Actions::DeleteTempKeychainAction.run
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.description
|
def self.description
|
||||||
@ -109,7 +109,7 @@ module Fastlane
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.is_supported?(platform)
|
def self.is_supported?(platform)
|
||||||
true
|
[:ios].include?(platform)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,17 +6,17 @@ module Fastlane
|
|||||||
module Helper
|
module Helper
|
||||||
class IosCdHelper
|
class IosCdHelper
|
||||||
# Define method to delete temporary keychain
|
# Define method to delete temporary keychain
|
||||||
def delete_temp_keychain(name)
|
def self.delete_temp_keychain(name)
|
||||||
if File.exist?(File.expand_path("~/Library/Keychains/#{name}-db"))
|
if File.exist?(File.expand_path("~/Library/Keychains/#{name}-db"))
|
||||||
Fastlane::Actions.delete_keychain(
|
Actions::DeleteKeychainAction.run(
|
||||||
name: name
|
name: name
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Define method to create temporary keychain
|
# Define method to create temporary keychain
|
||||||
def create_temp_keychain(name, password)
|
def self.create_temp_keychain(name, password)
|
||||||
Fastlane::Actions.create_keychain(
|
Actions::CreateKeychainAction.run(
|
||||||
name: name,
|
name: name,
|
||||||
password: password,
|
password: password,
|
||||||
unlock: false,
|
unlock: false,
|
||||||
@ -25,7 +25,7 @@ module Fastlane
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Define method to ensure that temporary keychain exists
|
# Define method to ensure that temporary keychain exists
|
||||||
def ensure_temp_keychain(name, password)
|
def self.ensure_temp_keychain(name, password)
|
||||||
delete_temp_keychain(name)
|
delete_temp_keychain(name)
|
||||||
create_temp_keychain(name, password)
|
create_temp_keychain(name, password)
|
||||||
end
|
end
|
||||||
@ -40,7 +40,8 @@ module Fastlane
|
|||||||
# Decrypts ios credentials
|
# Decrypts ios credentials
|
||||||
def self.decrypt_ios_keys(ios_directory)
|
def self.decrypt_ios_keys(ios_directory)
|
||||||
# Define the GPG command with options
|
# Define the GPG command with options
|
||||||
gpg_command = "gpg --quiet --batch --yes --decrypt --passphrase=#{ENV['IOS_KEYS_SECRET_PASSPHRASE']} \
|
# gpg_command = "gpg --quiet --batch --yes --decrypt --passphrase=#{ENV['IOS_KEYS_SECRET_PASSPHRASE']} \
|
||||||
|
gpg_command = "gpg --quiet --batch --yes --decrypt --passphrase=toto1234 \
|
||||||
--output #{ios_directory}/ios_keys.zip #{ios_directory}/ios_keys.zip.gpg"
|
--output #{ios_directory}/ios_keys.zip #{ios_directory}/ios_keys.zip.gpg"
|
||||||
|
|
||||||
# Execute the GPG command using system
|
# Execute the GPG command using system
|
||||||
@ -48,9 +49,8 @@ module Fastlane
|
|||||||
|
|
||||||
# Check if the command executed successfully
|
# Check if the command executed successfully
|
||||||
if $?.success?
|
if $?.success?
|
||||||
|
|
||||||
# Move the extracted files to the current directory
|
# Move the extracted files to the current directory
|
||||||
`jar xvf #{ios_directory} && mv #{ios_directory}/ios_keys/* #{ios_directory}`
|
`jar xvf #{ios_directory}/ios_keys.zip && mv #{ios_directory}/ios_keys/* #{ios_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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user