diff --git a/.fastlane/Fastfile b/.fastlane/Fastfile index 53333ed6fee..145a0166e48 100644 --- a/.fastlane/Fastfile +++ b/.fastlane/Fastfile @@ -22,8 +22,19 @@ platform :ios do match(type: "appstore") end + private_lane :api_key_if_needed do + # We recommend to have api key on local machines to improve sign-in experience + # While on the CI we will use api key components for the authentication + # You can setup the api key by following the guide: https://github.com/mapbox/apple-internal/blob/master/guides/Modern%20authentification.md + file_path = ENV['APP_STORE_CONNECT_API_KEY_PATH'] + + if file_path.nil? || !File.exist?(file_path) + app_store_connect_api_key + end + end + lane :build_examples_tests do - app_store_connect_api_key + api_key_if_needed setup_circle_ci sync_code_signing update_code_signing_settings( @@ -85,7 +96,7 @@ platform :ios do end lane :beta do - app_store_connect_api_key # Generate API Token + api_key_if_needed # Generate API Token increment_build_number( build_number: latest_testflight_build_number + 1, xcodeproj: 'Apps/Examples/Examples.xcodeproj' @@ -123,7 +134,7 @@ platform :ios do lane :build_tests do sh("cd .. && xcodegen") - app_store_connect_api_key # Generate API Token + api_key_if_needed # Generate API Token setup_circle_ci sync_code_signing(app_identifier: "com.mapbox.MapboxMapsTestHost") update_code_signing_settings( diff --git a/Gemfile b/Gemfile index a65a4427972..f407285aaca 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source "https://rubygems.org" -gem "fastlane", '>=2.219.0' +# Fastlane 2.220.0 introduced a new crypto algo for Match, which is not compatible with the pre-existed versions +gem "fastlane", '= 2.219.0' plugins_path = File.join(File.dirname(__FILE__), '.fastlane', 'Pluginfile') eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index 9cc4d275d9b..e228d6b32fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.954.0) + aws-partitions (1.955.0) aws-sdk-core (3.201.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) @@ -81,14 +81,14 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.3.1) - fastlane (2.221.1) + fastlane (2.219.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored (~> 1.2) + colored commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -109,10 +109,10 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (>= 0.1.1, < 1.0.0) + optparse (>= 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.5) + security (= 0.1.3) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (~> 3) @@ -121,7 +121,7 @@ GEM word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + xcpretty-travis-formatter (>= 0.0.3) gh_inspector (1.1.3) google-apis-androidpublisher_v3 (0.54.0) google-apis-core (>= 0.11.0, < 2.a) @@ -189,7 +189,7 @@ GEM rouge (2.0.7) ruby2_keywords (0.0.5) rubyzip (2.3.2) - security (0.1.5) + security (0.1.3) signet (0.19.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) @@ -228,7 +228,7 @@ PLATFORMS arm64-darwin-23 DEPENDENCIES - fastlane (>= 2.219.0) + fastlane (= 2.219.0) fastlane-plugin-firebase_test_lab! BUNDLED WITH