scan/lib/scan/report_collector.rb
# Returns a hash containg the resulting path as key and the command as value
Returns a hash containg the resulting path as key and the command as value
Returns a hash containg the resulting path as key and the command as value
def generate_commands(path, types: nil, output_file_name: nil)
      types ||= @output_types
      types = types.split(",") if types.kind_of?(String) 
      commands = {}
      types.each do |raw|
        type = raw.strip
        unless SUPPORTED.include?(type)
          Helper.log.error "Couldn't find reporter '#{type}', available #{SUPPORTED.join(', ')}"
          next
        end
        file_name = "report.#{type}"
        output_path = output_file_name || File.join(File.expand_path(@output_directory), file_name)
        parts = ["cat '#{path}' | "]
        parts << "xcpretty"
        parts << "--report #{type}"
        parts << "--output '#{output_path}'"
        parts << "&> /dev/null "
        commands[output_path] = parts.join(" ")
      end
      return commands
    end
def generate_commands ( path , types : nil , output_file_name : nil ) types ||= @output_types types = types . split ( "," ) if types . kind_of? ( String ) commands = { } types . each do | raw | type = raw . strip unless SUPPORTED . include? ( type ) Helper . log . error "Couldn't find reporter '#{type}', available #{SUPPORTED.join(', ')}" next end file_name = "report.#{type}" output_path = output_file_name || File . join ( File . expand_path ( @output_directory ) , file_name ) parts = [ "cat '#{path}' | " ] parts << "xcpretty" parts << "--report #{type}" parts << "--output '#{output_path}'" parts << "&> /dev/null " commands [ output_path ] = parts . join ( " " ) end return commands end
Returns a hash containg the resulting path as key and the command as value
Returns a hash containg the resulting path as key and the command as value
# might already be an array when passed via fastlane
path
<not_specific>
types
<not_specific>
output_file_name
<not_specific>