Created
June 1, 2016 18:45
-
-
Save FranDepascuali/22b6c9726a088d5f8cfbfae8292339ba to your computer and use it in GitHub Desktop.
Fastlane
This file contains hidden or 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
# https://labs.kunstmaan.be/blog/ios-continuous-delivery-with-jenkins-and-fastlane?this-one-is-for-you-roderik | |
# Define the minimal Fastlane version | |
# fastlane_version "1.41.1" | |
# Use the iOS platform as default | |
default_platform :ios | |
# Define what to do for the iOS platform | |
platform :ios do | |
# Run this before doing anything else | |
before_all do | |
carthage( | |
platform: "iOS", | |
use_binaries: false, | |
use_ssh: true | |
) | |
end | |
# After all the steps have completed succesfully, run this. | |
after_all do |lane| | |
# Remove all build artifacts created by fastlane to upload | |
clean_build_artifacts | |
end | |
# If there was an error, run this | |
error do |lane, exception| | |
# Remove all build artifacts created by fastlane to upload | |
clean_build_artifacts | |
end | |
# Build and publish the Alpha version to Hockeyapp | |
lane :release_testflight do | |
increment_build_number | |
# Build | |
build_app( | |
# Set the app id | |
app_identifier:"com.SonicWords.SonicWords", | |
# What configuration to use, usefull for keeping different API keys etc between environments | |
configuration:"release", | |
# Use this codesigning identity (this is the name of the certificate in your keychain) | |
codesigning_identity:"iPhone Distribution: Sonic Words Inc.", | |
# the projectname, this is the name of the .xcodeproj file and the folder containing your code in the project | |
project_name:"SonicWords", | |
# the scheme to build | |
scheme: "SonicWords", | |
# Your team ID | |
team_id: "RGZK2U7JDA" | |
) | |
publish_testflight | |
end | |
private_lane :build_app do |options| | |
# Update the app identifier | |
update_app_identifier( | |
xcodeproj: "#{options[:project_name]}.xcodeproj", | |
plist_path: "#{options[:project_name]}/Info.plist", | |
app_identifier: options[:app_identifier] | |
) | |
# Download certificates | |
cert | |
# Download provisioning profiles | |
sigh | |
# Build the app | |
gym( | |
scheme: "#{options[:scheme]}", | |
configuration: options[:configuration], | |
codesigning_identity: options[:codesigning_identity], | |
) | |
end | |
# Publish to Testflight | |
private_lane :publish_testflight do |options| | |
pilot | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment