Method: Fastlane::FastFile#override_lane

Defined in:
fastlane/lib/fastlane/fast_file.rb

#override_lane(lane_name, &block) ⇒ Object

User defines a lane that can overwrite existing lanes. Useful when importing a Fastfile



109
110
111
112
113
114
115
116
117
118
119
# File 'fastlane/lib/fastlane/fast_file.rb', line 109

def override_lane(lane_name, &block)
  UI.user_error!("You have to pass a block using 'do' for lane '#{lane_name}'. Make sure you read the docs on GitHub.") unless block

  self.runner.add_lane(Lane.new(platform: self.current_platform,
                                   block: block,
                             description: desc_collection,
                                    name: lane_name,
                              is_private: false), true)

  @desc_collection = nil # reset the collected description again for the next lane
end