Last active
September 10, 2020 10:54
-
-
Save elenipapanik/ecdf6615f198364dc638da6f5932f843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastlane_version "2.75.0" | |
default_platform :ios | |
lane :test do |options| | |
configuration = options[:configuration] | |
scan( | |
clean: true, | |
devices: ["iPhone X"], | |
workspace: "our_project.xcworkspace", | |
scheme: configuration, | |
code_coverage: true, | |
output_directory: "./test_output", | |
output_types: "html,junit" | |
) | |
slather( | |
cobertura_xml: true, | |
proj: "our_project.xcodeproj", | |
workspace: "our_project.xcworkspace", | |
output_directory: "./test_output", | |
scheme: configuration, | |
jenkins: true, | |
ignore: [array_of_docs_to_ignore] | |
) | |
end | |
lane :build do |options| | |
bundle_id = options[:bundle_id] | |
configuration = options[:configuration] | |
provisioning_profile = options[:provisioning_profile] | |
match( | |
git_branch: "the_branch_of_the_repo_with_the_prov_profile", | |
username: "github_username", | |
git_url: "github_repo_with_prov_profiles", | |
type: "appstore", | |
app_identifier: bundle_id, | |
force: true) | |
version = get_version_number( | |
xcodeproj: "our_project.xcodeproj", | |
target: "production_target" | |
) | |
build_number = latest_testflight_build_number( | |
version: version, | |
app_identifier: bundle_id, | |
initial_build_number: 0 | |
) | |
increment_build_number({ build_number: build_number + 1 }) | |
settings_to_override = { | |
:BUNDLE_IDENTIFIER => bundle_id, | |
:PROVISIONING_PROFILE_SPECIFIER => provisioning_profile, | |
:DEVELOPMENT_TEAM => "team_id" | |
} | |
export_options = { | |
iCloudContainerEnvironment: "Production", | |
provisioningProfiles: { bundle_id => provisioning_profile } | |
} | |
gym( | |
clean: true, | |
scheme: configuration, | |
configuration: configuration, | |
xcargs: settings_to_override, | |
export_method: "app-store", | |
include_bitcode: true, | |
include_symbols: true, | |
export_options: export_options | |
) | |
end | |
lane :upload_to_testflight do |options| | |
bundle_id = options[:bundle_id] | |
pilot( | |
ipa: "./build/WorkableApp.ipa", | |
skip_submission: true, | |
skip_waiting_for_build_processing: true, | |
app_identifier: bundle_id | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment