Created
April 6, 2018 05:26
-
-
Save tjkang/d8f9ff08b04b6aa6db03304e0fc6489b to your computer and use it in GitHub Desktop.
Fastfile for iOS
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
.... | |
desc "Submit a new Beta Build to crashlytics" | |
desc "This will also make sure the profile is up to date" | |
lane :beta do |values| | |
# Before calling match, we make sure all our devices are registered on the Apple Developer Portal | |
create_keychain( | |
name: ENV["MATCH_KEYCHAIN_NAME"], | |
password: ENV["MATCH_KEYCHAIN_PASSWORD"], | |
default_keychain: true, | |
unlock: true, | |
timeout: 3600, | |
add_to_search_list: true | |
) | |
unlock_keychain( | |
path: ENV["MATCH_KEYCHAIN_NAME"], | |
add_to_search_list: :replace, | |
password: ENV['MATCH_KEYCHAIN_PASSWORD'] | |
) | |
register_devices( | |
devices_file: "./fastlane/devices.txt", | |
) | |
match( | |
app_identifier: "com.kangsta.sampleApp", | |
type: "adhoc", | |
force_for_new_devices: !is_ci, # update only forced on non-CI systems, and only if there is a new device | |
# clone_branch_directly: true, | |
readonly: true, #readonly mode to be sure it won't create any new certificates or profiles. | |
keychain_name: ENV["MATCH_KEYCHAIN_NAME"], | |
keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"] | |
) | |
# Change build number (requirement of Testflight). | |
#increment_build_number( | |
# xcodeproj: "./sampleApp.xcodeproj" | |
#) | |
# Build a release | |
gym( | |
scheme: "sampleApp", | |
clean: true, | |
project: "./sampleApp.xcodeproj", | |
workspace: "./sampleApp.xcworkspace", # since using pods | |
export_method: "ad-hoc", | |
) | |
emails = values[:test_email] ? values[:test_email] : ['tj@abc.com'] # You can list more emails here | |
groups = values[:test_email] ? nil : nil # You can define groups on the web and reference them here | |
crashlytics( | |
api_token: '[api_token]', | |
build_secret: '[build_token]', | |
emails: emails, | |
groups: groups, | |
debug: true, | |
notes: 'Distributed with fastlane', # Check out the changelog_from_git_commits action | |
notifications: true # Should this distribution notify your testers via email? | |
) | |
# sh "your_script.sh" | |
# You can also use other beta testing services here (run `fastlane actions`) | |
end | |
.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment