From f7770f49a82f13eb82f16078db348cd4aa2a52cc Mon Sep 17 00:00:00 2001 From: Igor Kislyuk Date: Sun, 3 Dec 2017 18:44:39 +0300 Subject: [PATCH] Provide backward compatibility --- xcode/commonFastfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 96701d3..98f8055 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -1,5 +1,7 @@ +$appName = File.basename(Dir['../*.xcworkspace'].first, '.*') + before_all do |lane, options| - appName = options[:appName] + appName = options[:appName] ? options[:appName] : $appName podsReposPath = File.expand_path "~/.cocoapods/repos/master/" lockFilePath = "#{podsReposPath}/.git/index.lock" @@ -22,7 +24,7 @@ end after_all do |lane, options| if options[:uploadToFabric] - appName = options[:appName] + appName = options[:appName] ? options[:appName] : $appName token = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $4}' | tr -d '\n'") secret = sh("cat ../#{appName}.xcodeproj/project.pbxproj | grep 'Fabric/run' | awk '{print $5}' | sed 's/..$//' | tr -d '\n'") @@ -48,7 +50,7 @@ end private_lane :buildConfiguration do |options| configuration = lane_context[SharedValues::LANE_NAME] method = configuration.start_with?("Enterprise") ? "enterprise" : "development" - appName = options[:appName] + appName = options[:appName] ? options[:appName] : $appName uploadToFabric = options[:uploadToFabric] icloudEnvironment = options[:iCloudContainerEnvironment] || "" exportOptions = icloudEnvironment.to_s.empty? ? {} : {iCloudContainerEnvironment: icloudEnvironment}