Skip to content

Instantly share code, notes, and snippets.

@underwindfall
Created October 10, 2018 09:48
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 underwindfall/c3b5b3609ebfbc508a5a6c83952df478 to your computer and use it in GitHub Desktop.
Save underwindfall/c3b5b3609ebfbc508a5a6c83952df478 to your computer and use it in GitHub Desktop.
Template FastFile iOS
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
fastlane_require 'plist'
default_platform(:ios)
platform :ios do
before_all do
load_keys
end
def load_keys
begin
import("~/jenkins/fastlane/keys")
ENV["FASTLANE_PASSWORD"]=ENV["PASSWORD"]
rescue => exception
import("../../keys")
UI.error("Not on CI server, load local config")
end
end
desc "Increment app version"
lane :increment_version do |options|
increment_version_number(
version_number: options[:version]
)
end
desc "Update iOS info.plist file"
lane :update_deepLink do |options|
update_info_plist(
plist_path: "Info-#{options[:target]}.plist",
scheme: "MarketPay-#{options[:target]}",
block: proc do |plist|
plist[:APP_DOMAIN] = options[:url]
end
)
path = File.expand_path("../MarketPay-#{options[:target]}.entitlements")
plist = Plist.parse_xml(path)
plist["com.apple.developer.associated-domains"] = ["applinks:#{options[:url]}"]
new_plist = Plist::Emit.dump(plist)
File.write(path, new_plist)
end
desc "Submit a new Beta Client Build to Crashlytics Beta"
lane :beta do |options|
bundle_install
cocoapods
cert
sigh
gym(
scheme: "MarketPay-#{options[:target]}",
output_directory: "./build",
output_name: "MarketPay-#{options[:target]}.ipa"
)
crashlytics(
api_token: ENV["CRASHLYTICS_API_TOKEN"],
build_secret: ENV["CRASHLYTICS_BUILD_SECRET"],
groups: options[:beta_group] || "mptesters",
notifications: true,
notes_path: ENV["RELEASE_NOTES_PATH"]
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment