Skip to content

Commit

Permalink
Suppress wget command output
Browse files Browse the repository at this point in the history
To reduce noise
  • Loading branch information
BanzaiMan committed Dec 28, 2017
1 parent 94c867f commit 17745ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/travis/build/addons/chrome.rb
Expand Up @@ -6,6 +6,7 @@ module Build
class Addons
class Chrome < Base
SUPER_USER_SAFE = true
WGET_FLAGS = ' --no-verbose'

attr_reader :version

Expand All @@ -25,12 +26,12 @@ def after_prepare
sh.echo "Google Chrome addon is not supported on Precise", ansi: :yellow
end
sh.else do
sh.cmd "wget -O /tmp/$(basename $CHROME_SOURCE_URL) $CHROME_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "wget#{WGET_FLAGS} -O /tmp/$(basename $CHROME_SOURCE_URL) $CHROME_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "sudo dpkg -i /tmp/$(basename $CHROME_SOURCE_URL)"
end
end
sh.elif '$(uname) = "Darwin"' do
sh.cmd "wget -O /tmp/$(basename $CHROME_SOURCE_URL) $CHROME_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "wget#{WGET_FLAGS} -O /tmp/$(basename $CHROME_SOURCE_URL) $CHROME_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "hdiutil mount -readonly -mountpoint chrome /tmp/$(basename $CHROME_SOURCE_URL)"
sh.cmd "sudo rm -rf /Applications/Google\\ Chrome.app"
sh.cmd "sudo cp -a chrome/Google\\ Chrome.app /Applications"
Expand Down
5 changes: 3 additions & 2 deletions lib/travis/build/addons/firefox.rb
Expand Up @@ -6,6 +6,7 @@ module Build
class Addons
class Firefox < Base
SUPER_USER_SAFE = true
WGET_FLAGS = ' --no-verbose'

attr_reader :version, :latest

Expand All @@ -23,12 +24,12 @@ def after_prepare
sh.chown 'travis', install_dir, recursive: true
sh.cd install_dir, echo: false, stack: true
sh.if '$(uname) = "Linux"' do
sh.cmd "wget -O /tmp/#{filename} $FIREFOX_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "wget#{WGET_FLAGS} -O /tmp/#{filename} $FIREFOX_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "tar xf /tmp/#{filename}"
sh.export 'PATH', "#{install_dir}/firefox:$PATH"
end
sh.elif '$(uname) = "Darwin"' do
sh.cmd "wget -O /tmp/#{filename('dmg')} $FIREFOX_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "wget#{WGET_FLAGS} -O /tmp/#{filename('dmg')} $FIREFOX_SOURCE_URL", echo: true, timing: true, retry: true
sh.cmd "hdiutil mount -readonly -mountpoint firefox /tmp/#{filename('dmg')}"
sh.cmd "sudo rm -rf /Applications/Firefox.app"
sh.cmd "sudo cp -a firefox/Firefox.app /Applications"
Expand Down
2 changes: 1 addition & 1 deletion spec/build/addons/firefox_spec.rb
Expand Up @@ -27,7 +27,7 @@
it { should include_sexp [:cd, '$HOME/firefox-20.0', stack: true] }
it { should include_sexp [:export, ['FIREFOX_SOURCE_URL', "'https://#{host}/#{path}'"], echo: true] }

it { should include_sexp [:cmd, 'wget -O /tmp/firefox-20.0.tar.bz2 $FIREFOX_SOURCE_URL', echo: true, timing: true, retry: true] }
it { should include_sexp [:cmd, 'wget --no-verbose -O /tmp/firefox-20.0.tar.bz2 $FIREFOX_SOURCE_URL', echo: true, timing: true, retry: true] }
it { should include_sexp [:cmd, 'tar xf /tmp/firefox-20.0.tar.bz2'] }
it { should include_sexp [:export, ['PATH', "$HOME/firefox-20.0/firefox:$PATH"], echo: true] }
it { should include_sexp [:cd, :back, stack: true] }
Expand Down

0 comments on commit 17745ba

Please sign in to comment.