Skip to content

Instantly share code, notes, and snippets.

@tjkang
Last active August 11, 2017 16:46
Show Gist options
  • Save tjkang/cc8116d9894d69d516362ce714bb4da4 to your computer and use it in GitHub Desktop.
Save tjkang/cc8116d9894d69d516362ce714bb4da4 to your computer and use it in GitHub Desktop.
Fastfile recipes for Beta_Crashlytics
fastlane_version "2.25.0"
default_platform :ios
platform :ios do
lane :beta do |values|
# Before calling match, we make sure all our devices are registered on the Apple Developer Portal
register_devices(
devices_file: "./fastlane/devices.txt",
username: 'user@abc.com'
)
# After registering the new devices, we'll make sure to update the provisioning profile if necessary
# options for type are "adhoc", "development", "appstore"
match(
force_for_new_devices: true,
type: "development",
# readonly: true #readonly mode to be sure it won't create any new certificates or profiles.
)
# Change build number (requirement of Testflight).
increment_build_number(
xcodeproj: "./AppName.xcodeproj"
)
# Build a release
gym(
scheme: "AppName",
clean: true,
workspace: "./AppName.xcworkspace" # since using pods
# project: "./AppName.xcodeproj"
)
emails = values[:test_email] ? values[:test_email] : ['user1@abc.com', 'user2@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
# Upload release to crashlytics
crashlytics(
api_token: "[insert_key_here]",
build_secret: "[insert_key_here]",
emails: emails,
groups: groups,
notes: 'Distributed with fastlane', # Check out the changelog_from_git_commits action
notifications: true # Should this distribution notify your testers via email?
)
# You can notify your team in chat that a beta build has been uploaded
# slack(
# slack_url: "https://hooks.slack.com/services/YOUR/TEAM/INFO"
# channel: "beta-releases",
# message: "Successfully uploaded a beta release - see it at https://fabric.io/_/beta"
# )
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment