From 9730e9cc570f671893362f174291ec11c33ec115 Mon Sep 17 00:00:00 2001 From: Igor Kislyuk Date: Sun, 3 Dec 2017 18:48:58 +0300 Subject: [PATCH] Refactor --- xcode/commonFastfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index 98f8055..4d1a77e 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -1,7 +1,7 @@ $appName = File.basename(Dir['../*.xcworkspace'].first, '.*') before_all do |lane, options| - appName = options[:appName] ? options[:appName] : $appName + appName = options[:appName] || $appName podsReposPath = File.expand_path "~/.cocoapods/repos/master/" lockFilePath = "#{podsReposPath}/.git/index.lock" @@ -24,7 +24,7 @@ end after_all do |lane, options| if options[:uploadToFabric] - appName = options[:appName] ? options[:appName] : $appName + 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'") @@ -50,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] ? options[:appName] : $appName + appName = options[:appName] || $appName uploadToFabric = options[:uploadToFabric] icloudEnvironment = options[:iCloudContainerEnvironment] || "" exportOptions = icloudEnvironment.to_s.empty? ? {} : {iCloudContainerEnvironment: icloudEnvironment}