Sha256: f6a9435a7c62d22de1bcaeba95748a3a026ac1466a5c5d64ca30379dc279b0d9

Contents?: true

Size: 1.07 KB

Versions: 58

Compression:

Stored size: 1.07 KB

Contents

module Fastlane
  class LaneList
    # Print out the result of `generate`
    def self.output(path)
      puts generate(path)

      puts "Execute using `fastlane [lane_name]`".yellow
    end

    def self.generate(path)
      ff = Fastlane::FastFile.new(path)
      output = ""

      all_keys = ff.runner.lanes.keys.reject(&:nil?)
      all_keys.unshift(nil) # because we want root elements on top. always! They have key nil

      all_keys.each do |platform|
        next if (ff.runner.lanes[platform] || []).count == 0

        plat_text = platform
        plat_text = "general" if platform.to_s.empty?
        output += "\n--------- #{plat_text}---------\n".yellow

        value = ff.runner.lanes[platform]
        next unless value

        value.each do |lane_name, lane|
          next if lane.is_private

          output += "----- fastlane #{lane.pretty_name}".green
          if lane.description.count > 0
            output += "\n" + lane.description.join("\n") + "\n\n"
          else
            output += "\n\n"
          end
        end
      end

      output
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
fastlane-1.63.0 lib/fastlane/lane_list.rb
fastlane-1.62.0 lib/fastlane/lane_list.rb
fastlane-1.61.0 lib/fastlane/lane_list.rb
fastlane-1.60.0 lib/fastlane/lane_list.rb
fastlane-1.59.0 lib/fastlane/lane_list.rb
fastlane-1.58.0 lib/fastlane/lane_list.rb
fastlane-1.57.0 lib/fastlane/lane_list.rb
fastlane-1.56.0 lib/fastlane/lane_list.rb
fastlane-1.55.0 lib/fastlane/lane_list.rb
fastlane-1.54.0 lib/fastlane/lane_list.rb
fastlane-1.53.0 lib/fastlane/lane_list.rb
fastlane-1.52.0 lib/fastlane/lane_list.rb
fastlane-1.51.0 lib/fastlane/lane_list.rb
fastlane-1.50.0 lib/fastlane/lane_list.rb
fastlane-1.49.0 lib/fastlane/lane_list.rb
fastlane-1.48.0 lib/fastlane/lane_list.rb
fastlane-1.47.0 lib/fastlane/lane_list.rb
fastlane-1.46.1 lib/fastlane/lane_list.rb
fastlane-1.46.0 lib/fastlane/lane_list.rb
fastlane-1.45.0 lib/fastlane/lane_list.rb