Skip to content

Instantly share code, notes, and snippets.

@FranDepascuali
Created June 1, 2016 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FranDepascuali/22b6c9726a088d5f8cfbfae8292339ba to your computer and use it in GitHub Desktop.
Save FranDepascuali/22b6c9726a088d5f8cfbfae8292339ba to your computer and use it in GitHub Desktop.
Fastlane
# 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