Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Add option to suppress xcodebuild output #158

Merged
merged 4 commits into from
Dec 9, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/gym/generators/build_command_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def suffix
end

def pipe
["| tee '#{xcodebuild_log_path}' | xcpretty"]
pipe = []
pipe << "| tee '#{xcodebuild_log_path}' | xcpretty"
pipe << "> /dev/null" if Gym.config[:suppress_xcode_output]

pipe
end

def xcodebuild_log_path
Expand Down
9 changes: 8 additions & 1 deletion lib/gym/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ def self.plain_options
optional: true,
verify_block: proc do |value|
raise "File not found at path '#{File.expand_path(value)}'".red unless File.exist?(value)
end)
end),
FastlaneCore::ConfigItem.new(key: :suppress_xcode_output,
short_option: "-r",
env_name: "SUPPRESS_OUTPUT",
description: "Suppress the output of xcodebuild to stdout. Output is still saved in buildlog_path",
optional: true,
is_string: false
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align ) with (.

]
end
end
Expand Down