lib/gym/generators/build_command_generator.rb in gym-1.7.0 vs lib/gym/generators/build_command_generator.rb in gym-1.8.0

- old
+ new

@@ -33,10 +33,11 @@ options = [] options += project_path_array options << "-configuration '#{config[:configuration]}'" if config[:configuration] options << "-sdk '#{config[:sdk]}'" if config[:sdk] + options << "-toolchain '#{config[:toolchain]}'" if config[:toolchain] options << "-destination '#{config[:destination]}'" if config[:destination] options << "-xcconfig '#{config[:xcconfig]}'" if config[:xcconfig] options << "-archivePath '#{archive_path}'" options << "-derivedDataPath '#{config[:derived_data_path]}'" if config[:derived_data_path] options << "-resultBundlePath '#{result_bundle_path}'" if config[:result_bundle] @@ -61,11 +62,31 @@ suffix end def pipe pipe = [] - pipe << "| tee #{xcodebuild_log_path.shellescape} | xcpretty" - pipe << "--no-color" if Helper.colors_disabled? + pipe << "| tee #{xcodebuild_log_path.shellescape}" + unless Gym.config[:disable_xcpretty] + formatter = Gym.config[:xcpretty_formatter] + pipe << "| xcpretty" + pipe << " --test" if Gym.config[:xcpretty_test_format] + pipe << " --no-color" if Helper.colors_disabled? + pipe << " --formatter " if formatter + pipe << formatter if formatter + report_output_junit = Gym.config[:xcpretty_report_junit] + report_output_html = Gym.config[:xcpretty_report_html] + report_output_json = Gym.config[:xcpretty_report_json] + if report_output_junit + pipe << " --report junit --output " + pipe << report_output_junit + elsif report_output_html + pipe << " --report html --output " + pipe << report_output_html + elsif report_output_json + pipe << " --report json-compilation-database --output " + pipe << report_output_json + end + end pipe << "> /dev/null" if Gym.config[:suppress_xcode_output] pipe end