Skip to content

Commit

Permalink
Add fastlane integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunikkk committed Dec 9, 2022
1 parent 297b235 commit 28287ac
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
app_identifier "com.mapbox.maps.FlutterMapsExample" # The bundle identifier of your app
itc_team_name "Mapbox, Inc."
50 changes: 50 additions & 0 deletions .fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
default_platform(:ios)

ENV["FASTLANE_SKIP_UPDATE_CHECK"] = "1"
ENV["SPACESHIP_SKIP_2FA_UPGRADE"] = "1"

platform :ios do

lane :update_code_signing do
setup_circle_ci
sync_code_signing(type: "development")
end

lane :build_examples_tests do
setup_circle_ci
sync_code_signing(type: "development")
update_code_signing_settings(
use_automatic_signing: false,
path: "example/ios/Runner.xcodeproj",
team_id: "GJZR2MEM28", # Developer Portal Team ID,
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.maps.FlutterMapsExample"],
targets: ["Runner"],
code_sign_identity: "Apple Development: Machiney McMachineface",
)
update_code_signing_settings(
use_automatic_signing: false,
path: "example/ios/Runner.xcodeproj",
team_id: "GJZR2MEM28", # Developer Portal Team ID,
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]["com.mapbox.maps.FlutterRunnerTests"],
targets: ["RunnerTests"],
code_sign_identity: "Apple Development: Machiney McMachineface",
)
# build tests archive in the `output_directory` to launch on firebase
run_tests(
workspace: 'example/ios/Runner.xcworkspace',
scheme: 'Runner', # XCTest scheme
xcconfig: "example/ios/Flutter/Release.xcconfig",
derived_data_path: "example/build/output",
configuration: "Release",
xcargs: "ENABLE_TESTABILITY=YES SWIFT_TREAT_WARNINGS_AS_ERRORS=NO COMPILER_INDEX_STORE_ENABLE=NO",
skip_detect_devices: true, # Required
build_for_testing: true, # Required
sdk: 'iphoneos', # Required
should_zip_build_products: true, # Must be true to set the correct format for Firebase Test Lab,
result_bundle: true,
output_directory: "example/build/output/",
code_coverage: true
)
end

end
4 changes: 4 additions & 0 deletions .fastlane/Matchfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
git_url("[email protected]:mapbox/apple-certificates.git")
type("development") # The default type, can be: appstore, adhoc, enterprise or development
app_identifier(["com.mapbox.maps.FlutterMapsExample", "com.mapbox.maps.FlutterRunnerTests"])
username("[email protected]")
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source "https://rubygems.org"

gem "fastlane"

plugins_path = File.join(File.dirname(__FILE__), '.fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

0 comments on commit 28287ac

Please sign in to comment.