Skip to content

Commit

Permalink
test17
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMrn committed Nov 10, 2023
1 parent a4542c3 commit ad6d8ba
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ platform :ios do
end


desc "Load ASC API Key information to use in subsequent lanes"
desc 'Load ASC API Key information to use in subsequent lanes'
lane :load_asc_api_key do
app_store_connect_api_key(
key_id: ENV["ASC_KEY_ID"],
issuer_id: ENV["ASC_ISSUER_ID"],
key_content: ENV["ASC_KEY"],
key_id: ENV['ASC_KEY_ID'],
issuer_id: ENV['ASC_ISSUER_ID'],
key_content: ENV['ASC_KEY'],
is_key_content_base64: true,
in_house: false # detecting this via ASC private key not currently supported
)
end

desc "Bump build number based on most recent TestFlight build number"
desc 'Bump build number based on most recent TestFlight build number'
lane :fetch_and_increment_build_number do
#fetch read your app identifier defined in your Appfile
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]

current_version = get_version_number(
target: "main-target" # replace with your main target, required if you have more than one non-test target
target: 'main-target' # replace with your main target, required if you have more than one non-test target
)
latest_build_number = latest_testflight_build_number(
api_key: api_key,
Expand All @@ -45,17 +45,17 @@ lane :fetch_and_increment_build_number do
end


desc "Installs signing certificate in the keychain and downloads provisioning profiles from App Store Connect"
desc 'Installs signing certificate in the keychain and downloads provisioning profiles from App Store Connect'
lane :prepare_signing do |options|
team_id = CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]

keychain_name = "signing"
keychain_password = "temp"
keychain_name = 'signing'
keychain_password = 'temp'

delete_keychain(
name: keychain_name
) if File.exist? File.expand_path("~/Library/Keychains/#{keychain_name}-db")
) if File.exist? File.expand_path('~/Library/Keychains/#{keychain_name}-db')

create_keychain(
name: keychain_name,
Expand All @@ -66,8 +66,8 @@ end
)

import_certificate(
certificate_path: ENV["SIGNING_KEY_FILE_PATH"],
certificate_password: ENV["SIGNING_KEY_PASSWORD"],
certificate_path: ENV['SIGNING_KEY_FILE_PATH'],
certificate_password: ENV['SIGNING_KEY_PASSWORD'],
keychain_name: keychain_name,
keychain_password: keychain_password
)
Expand All @@ -83,29 +83,29 @@ end



desc "Build the iOS app for release"
desc 'Build the iOS app for release'
lane :build_release do |options|
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)

profile_name = "App Provisioning Profile" # replace with the name of the profile to use for the build
output_name = "example-iOS" # specify the name of the .ipa file to generate
export_method = "app-store" # specify the export method
profile_name = 'App Provisioning Profile' # replace with the name of the profile to use for the build
output_name = 'example-iOS' # specify the name of the .ipa file to generate
export_method = 'app-store' # specify the export method

# turn off automatic signing during build so correct code signing identity is guaranteed to be used
update_code_signing_settings(
use_automatic_signing: false,
targets: ["main-target"], # specify which targets to update code signing settings for
code_sign_identity: "Apple Distribution", # replace with name of code signing identity if different
targets: ['main-target'], # specify which targets to update code signing settings for
code_sign_identity: 'Apple Distribution', # replace with name of code signing identity if different
bundle_identifier: app_identifier,
profile_name: profile_name,
build_configurations: ["Release"] # only toggle code signing settings for Release configurations
build_configurations: ['Release'] # only toggle code signing settings for Release configurations
)

# build the app
gym(
scheme: "example-scheme", # replace with name of your project’s scheme
scheme: 'example-scheme', # replace with name of your project’s scheme
output_name: output_name,
configuration: "Release",
configuration: 'Release',
export_options: {
method: export_method,
provisioningProfiles: {
Expand All @@ -115,7 +115,7 @@ lane :build_release do |options|
)
end

desc "Upload to TestFlight / ASC"
desc 'Upload to TestFlight / ASC'
lane :upload_release do
api_key = lane_context[SharedValues::APP_STORE_CONNECT_API_KEY]

Expand All @@ -129,7 +129,7 @@ lane :upload_release do
)
end

desc "Build and upload to TestFlight"
desc 'Build and upload to TestFlight'
lane :build_upload_testflight do
load_asc_api_key
prepare_signing
Expand Down

0 comments on commit ad6d8ba

Please sign in to comment.