fastlane/lib/fastlane/lane_manager.rb in fastlane-2.90.0.beta.20180404050031 vs fastlane/lib/fastlane/lane_manager.rb in fastlane-2.90.0.beta.20180405050125

- old
+ new

@@ -4,16 +4,18 @@ class LaneManager < LaneManagerBase # @param platform The name of the platform to execute # @param lane_name The name of the lane to execute # @param parameters [Hash] The parameters passed from the command line to the lane # @param env Dot Env Information - def self.cruise_lane(platform, lane, parameters = nil, env = nil) + # @param A custom Fastfile path, this is used by fastlane.ci + # rubocop:disable Metrics/PerceivedComplexity + def self.cruise_lane(platform, lane, parameters = nil, env = nil, fastfile_path = nil) UI.user_error!("lane must be a string") unless lane.kind_of?(String) || lane.nil? UI.user_error!("platform must be a string") unless platform.kind_of?(String) || platform.nil? UI.user_error!("parameters must be a hash") unless parameters.kind_of?(Hash) || parameters.nil? - ff = Fastlane::FastFile.new(FastlaneCore::FastlaneFolder.fastfile_path) + ff = Fastlane::FastFile.new(fastfile_path || FastlaneCore::FastlaneFolder.fastfile_path) is_platform = false begin is_platform = ff.is_platform_block?(lane) rescue # rescue, because this raises an exception if it can't be found at all @@ -71,9 +73,10 @@ duration = ((Time.now - started) / 60.0).round finish_fastlane(ff, duration, e) return ff end + # rubocop:enable Metrics/PerceivedComplexity def self.skip_docs? Helper.test? || FastlaneCore::Env.truthy?("FASTLANE_SKIP_DOCS") end