Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created January 15, 2018 14:20
Show Gist options
  • Save vialyx/063069c33f49c84ec7a892eef02c5172 to your computer and use it in GitHub Desktop.
Save vialyx/063069c33f49c84ec7a892eef02c5172 to your computer and use it in GitHub Desktop.
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.55.0"
default_platform :ios
platform :ios do
before_all do |lane, values|
keychainPath = values[:keychainPath] # => keychainPath:"~/Library/Keychains/login.keychain"
keychainPassword = values[:keychainPassword] # => keychainPassword:"password"
if !keychainPath.nil? && !keychainPassword.nil?
unlock_keychain( # => Unlock system keychain to get certificates in lane gym
path: keychainPath,
password: keychainPassword
)
cocoapods # => Install cocoapods
end
end
desc "Fabric Env for QA Team"
lane :dev do |values| # => specify values fastlane dev keychainPath:"~/Library/Keychains/login.keychain" keychainPassword:"password" scheme:"AwesomeScheme" configuration:"Release" exportMethod:"enterprise" crashlyticsGroups:"AwesomeGroup" slackChannel:"AwesomeChannel"
increment_build_number(build_number: ENV["BUILD_NUMBER"]) # => Set Jenkins build number to xcodeproject
notes = changelog_from_git_commits(commits_count: 10, pretty: "%s", merge_commit_filtering: "exclude_merges") # => Collect changes from Git
scheme = values[:scheme] # => scheme:"AwesomeScheme"
configuration = values[:configuration] # => configuration:"Release"
exportMethod = values[:exportMethod] # => exportMethod:"enterprise"
gym( # => Build and Export .ipa
scheme: scheme, # => Build Scheme
configuration: configuration, # => Build Configuration
silent: true, # => Set up true to hide details
clean: true, # => Clean Before Build
include_bitcode: false,
export_method: export_method, # => Export Method
export_options: {
uploadBitcode: false,
uploadSymbols: true,
compileBitcode: false
}
)
crashlyticsGroups = values[:crashlyticsGroups] # => crashlyticsGroups:"AwesomeGroup"
crashlytics( # => Send Message to Crashlytics
api_token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', # => Provide your TOKEN
build_secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', # => Provide your SECRET
groups: crashlyticsGroups, # => Crashlytics Beta Group
notes: notes, # => Build Notes
notifications: true # => Set up tru to send notifications
)
uploadSymbols = values[:uploadSymbols]
if !uploadSymbols.nil?
upload_symbols_to_crashlytics
end
end
desc "dSYM uploading"
lane :dsym do |values|
upload_symbols_to_crashlytics
end
end
# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions
# fastlane reports which actions are used. No personal data is recorded.
# Learn more at https://github.com/fastlane/fastlane#metrics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment