By the end of 2014, I discovered a project that was going to save me hours every week: fastlane by KrauseFx. After using it locally on my Mac, setting it up on my college's Macs, putting it on our CI, today is part of our daily routine. I created lanes that we share between our projects, this repository contains these lanes. It is not perfect but I hope it will help.
Just run this on your project folder:
curl https://raw.githubusercontent.com/barrault01/my_fastlane_lanes/master/install-fastlane.sh | bash
change_version_number
: Change version number with promptpatch
: Increment by one the project version number (ex: 2.0.1 => 2.0.2)minor
: Increment by one the project version number (ex: 2.0.1 => 2.1.0)major
: Increment by one the project version number (ex: 2.0.1 => 3.0.0)bump
: Increment build number
device
: Add new device to Apple portalrematch
: Renew provisioning profiles
pr
: Create a pull request from your terminaltag_the_release
: Create a tag with the date of today using build number and version number
install_private_repo
: Install you private pods repository on your mac or on the CIpublish_pod
: Publish a new version of you pod automaticallytag_and_pod
: Publish a new version of you pod automatically after creating a new tag based on the project version numberlint_pod
: Lint the .podspec
snap
: Create Snapshots to tests if autolayout is OKtesting
: Test your project and generate logsbuilding_time
: Generate reports for building time.prod
: Create a new app in production and send it to Applefabric
: Create a beta version of the app with a custom icon and then send it to fabricsubmit
: Submit the last build to the app store
To use our lanes, fork this repository and just add a line on the top of your fastfile:
import_from_git(url: 'git@github.com:YOUR_USERNAME/my_fastlane_lanes.git', path: 'fastlane/Fastfile')
Then declare the informations of your project like this:
def proj
{
plist: "./PATH_TO_PROJECT/Info.plist",
xcodeproj: "./PATH_TO_PROJECT.xcodeproj/",
repo_url: "https://github.com/MyTeam/fastlane",
scheme: "MyProject",
scheme_prod: "MyProject-Prod",
scheme_qa: "MyProject-Beta,
app_identifier_for_qa: "my.company.myapp.beta", #optional use this if you have different app identifier between QA and prod
fabric_testers: 'vivapro---ios',
default_branch: 'develop'
}
If your project is a pod:
def cocoapods
{
private_repo: "my_private_repo",
private_repo_name: "my_private_repo",
private_repo_git_url: "git@github.com:MyTeam/my_private_repo.git",
podspec: "./MyPod.podspec",
pod_name: "MyPod"
}
fastlane THE_NAME_OF_THE_LANE
Check that this variable are setted:
ENV["CRASHLYTICS_API_TOKEN"] =
ENV["CRASHLYTICS_BUILD_SECRET"] =
ENV["SLACK_URL"] =
ENV["DELIVER_PASSWORD"] =
ENV["PILOT_USERNAME"] =
ENV["MATCH_PASSWORD"] =
ENV["DELIVER_USER"] =
ENV["GITHUB_TOKEN"] =
team_id =
Please submit an issue on GitHub and ping me on Twitter with the link of the issue.