Created
October 20, 2015 18:35
-
-
Save czechboy0/0f4db3c7e7d8677239f4 to your computer and use it in GitHub Desktop.
Example: Fastlane provision lane for Xcode Server
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
lane :provision do | |
ENV['SIGH_APP_IDENTIFIER'] = 'com.honzadvorsky.XCSTutorialProject1' | |
ENV['SIGH_OUTPUT_PATH'] = './ProvisioningProfiles' | |
ENV['SIGH_USERNAME'] = "#{ENV['USER']}@icloud.com" | |
ENV['SIGH_SKIP_CERTIFICATE_VERIFICATION'] = 'true' # https://github.com/KrauseFx/sigh/issues/141 | |
ENV['FL_PROJECT_PROVISIONING_PROJECT_PATH'] = 'XCSTutorialProject1.xcodeproj' | |
ENV['FL_PROJECT_PROVISIONING_PROFILE_TARGET_FILTER'] = '^XCSTutorialProject1$' # exact match in regex, we don't want e.g. XCSTutorialProject1Tests | |
# create a folder for our provisioning profiles if not exists | |
sh "cd .. && mkdir -p ProvisioningProfiles" | |
# generate development profile | |
profile_name = 'tutorial_app_dev' | |
profile_file = "#{profile_name}.mobileprovision" | |
profile_path = "./ProvisioningProfiles/#{profile_file}" | |
udid_dev = sigh( | |
provisioning_name: profile_name, | |
filename: profile_file, | |
development: true | |
) | |
# set the development profile in the project | |
update_project_provisioning( | |
profile: profile_path, | |
build_configuration: 'Debug' | |
) | |
# generate appstore profile | |
profile_name = 'tutorial_app_appstore' | |
profile_file = "#{profile_name}.mobileprovision" | |
profile_path = "./ProvisioningProfiles/#{profile_file}" | |
udid_appstore = sigh( | |
provisioning_name: profile_name, | |
filename: profile_file | |
) | |
# set the appstore profile in the project | |
update_project_provisioning( | |
profile: profile_path, | |
build_configuration: 'Release' | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment