Last active
January 22, 2019 11:49
-
-
Save doc2dev/a2024c529d06a5d79933e0a91b80ed2e 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
# 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.1.1" | |
current_version = "not-set" | |
version_name = "not-set" | |
default_platform :android | |
platform :android do | |
desc "Runs all the tests" | |
lane :test do | |
gradle(task: "test") | |
end | |
desc "Submit a new Beta Build to Crashlytics Beta" | |
lane :beta do |options| | |
changelog = changelog_from_git_commits( | |
pretty: '- (%ae) %s', # Optional, lets you provide a custom format to apply to each commit when generating the changelog text | |
commits_count: 2, | |
include_merges: false, | |
) | |
environment = options[:env] | |
build(task: "assemble", build_type:"Release", flavor: environment) | |
crashlytics( | |
notes_path: "./changelog.txt", | |
api_token: "token", | |
build_secret: "secret", | |
groups: ["groups"] | |
) | |
# sh "your_script.sh" | |
# You can also use other beta testing services here | |
end | |
desc "Deploy a new version to the Google Play" | |
lane :deploy do | |
#gradle(task: "assembleRelease") | |
build(task: "assemble", build_type:"Release") | |
supply | |
end | |
desc "Upload a new version to Google Play Beta Track" | |
lane :demo do | |
build(task: "assemble", build_type:"Release", flavor: "demo") | |
end | |
private_lane :build do |options| | |
task = options[:task] | |
build_type = options[:build_type] | |
flavor = options[:flavor] | |
# Get the last version code and increment it. | |
gradle(task: task, build_type: build_type, flavor: flavor, properties: { 'versionCode' => current_version }) | |
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 sent or shared. Learn more at https://github.com/fastlane/enhancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment