diff options
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/update-report.rb | 16 | ||||
| -rw-r--r-- | Library/Homebrew/dependency_collector.rb | 16 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/tap-new.rb | 59 | ||||
| -rw-r--r-- | Library/Homebrew/diagnostic.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/diagnostic.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/test/diagnostic_test.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/test/uses_test.rb | 2 |
7 files changed, 60 insertions, 43 deletions
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 9d096c4cb..10b433dd2 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -25,11 +25,19 @@ module Homebrew Utils.popen_read("git", "config", "--local", "--get", "homebrew.analyticsmessage").chuzzle analytics_disabled = \ Utils.popen_read("git", "config", "--local", "--get", "homebrew.analyticsdisabled").chuzzle - if analytics_message_displayed != "true" && analytics_disabled != "true" && !ENV["HOMEBREW_NO_ANALYTICS"] + if analytics_message_displayed != "true" && analytics_disabled != "true" && + !ENV["HOMEBREW_NO_ANALYTICS"] && !ENV["HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT"] ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1" - ohai "Homebrew has enabled anonymous aggregate user behaviour analytics" - puts "Read the analytics documentation (and how to opt-out) here:" - puts " https://git.io/brew-analytics" + # Use the shell's audible bell. + print "\a" + + # Use an extra newline and bold to avoid this being missed. + ohai "Homebrew has enabled anonymous aggregate user behaviour analytics." + puts <<-EOS.undent + #{Tty.bold}Read the analytics documentation (and how to opt-out) here: + #{Formatter.url("https://git.io/brew-analytics")}#{Tty.reset} + + EOS # Consider the message possibly missed if not a TTY. if $stdout.tty? diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index 814084255..fff80a28c 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -61,6 +61,14 @@ class DependencyCollector parse_spec(spec, Array(tags)) end + def ant_dep(tags) + Dependency.new("ant", tags) + end + + def xz_dep(tags) + Dependency.new("xz", tags) + end + def self.tar_needs_xz_dependency? !new.xz_dep([]).nil? end @@ -138,14 +146,6 @@ class DependencyCollector spec.new(tags) end - def ant_dep(tags) - Dependency.new("ant", tags) - end - - def xz_dep(tags) - Dependency.new("xz", tags) - end - def resource_dep(spec, tags) tags << :build strategy = spec.download_strategy diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index f469aa359..03cbea646 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -44,36 +44,35 @@ module Homebrew write_path(tap, "README.md", readme) travis = <<-EOS.undent - language: ruby - os: osx - env: OSX=10.11 - osx_image: xcode7.3 - rvm: system - - before_install: - - export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)" - - if [ -f ".git/shallow" ]; then - travis_retry git fetch --unshallow; - fi - - sudo chown -R $USER "$(brew --repo)" - - git -C "$(brew --repo)" reset --hard origin/master - - git -C "$(brew --repo)" clean -qxdff - - brew update || brew update - - rm -rf "$(brew --repo $TRAVIS_REPO_SLUG)" - - mkdir -p "$(brew --repo $TRAVIS_REPO_SLUG)" - - rsync -az "$TRAVIS_BUILD_DIR/" "$(brew --repo $TRAVIS_REPO_SLUG)" - - export TRAVIS_BUILD_DIR="$(brew --repo $TRAVIS_REPO_SLUG)" - - cd "$(brew --repo)" - - export HOMEBREW_DEVELOPER="1" - - ulimit -n 1024 - - script: - - brew test-bot - - notifications: - email: - on_success: never - on_failure: always + language: ruby + os: osx + env: OSX=10.12 + osx_image: xcode8.1 + rvm: system + + before_install: + - export TRAVIS_COMMIT="$(git rev-parse --verify -q HEAD)" + - if [ -f ".git/shallow" ]; then + travis_retry git fetch --unshallow; + fi + - sudo chown -R $USER "$(brew --repo)" + - git -C "$(brew --repo)" reset --hard origin/master + - brew update || brew update + - rm -rf "$(brew --repo $TRAVIS_REPO_SLUG)" + - mkdir -p "$(brew --repo $TRAVIS_REPO_SLUG)" + - rsync -az "$TRAVIS_BUILD_DIR/" "$(brew --repo $TRAVIS_REPO_SLUG)" + - export TRAVIS_BUILD_DIR="$(brew --repo $TRAVIS_REPO_SLUG)" + - cd "$(brew --repo)" + - export HOMEBREW_DEVELOPER="1" + - ulimit -n 1024 + + script: + - brew test-bot + + notifications: + email: + on_success: never + on_failure: always EOS write_path(tap, ".travis.yml", travis) end diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 19148a6ae..e8506ce80 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -407,6 +407,12 @@ module Homebrew def check_homebrew_prefix return if HOMEBREW_PREFIX.to_s == "/usr/local" + # Allow our Jenkins CI tests to live outside of /usr/local. + if ENV["JENKINS_HOME"] && + ENV["GIT_URL"].to_s.start_with?("https://github.com/Homebrew/brew") + return + end + <<-EOS.undent Your Homebrew's prefix is not /usr/local. You can install Homebrew anywhere you want but some bottles (binary packages) diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index db054ea4c..157e7982b 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -69,6 +69,9 @@ module Homebrew return unless MacOS::Xcode.installed? return unless MacOS::Xcode.outdated? + # Travis CI images are going to end up outdated so don't complain. + return if ENV["TRAVIS"] + message = <<-EOS.undent Your Xcode (#{MacOS::Xcode.version}) is outdated. Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it). diff --git a/Library/Homebrew/test/diagnostic_test.rb b/Library/Homebrew/test/diagnostic_test.rb index aa2e44cfc..c9bb524b0 100644 --- a/Library/Homebrew/test/diagnostic_test.rb +++ b/Library/Homebrew/test/diagnostic_test.rb @@ -84,6 +84,7 @@ class DiagnosticChecksTest < Homebrew::TestCase end def test_check_homebrew_prefix + ENV.delete("JENKINS_HOME") # the integration tests are run in a special prefix assert_match "Your Homebrew's prefix is not /usr/local.", @checks.check_homebrew_prefix diff --git a/Library/Homebrew/test/uses_test.rb b/Library/Homebrew/test/uses_test.rb index 2b1555417..1fad0da28 100644 --- a/Library/Homebrew/test/uses_test.rb +++ b/Library/Homebrew/test/uses_test.rb @@ -11,6 +11,6 @@ class IntegrationCommandTestUses < IntegrationCommandTestCase assert_equal "", cmd("uses", "baz") assert_equal "baz", cmd("uses", "bar") - assert_equal "bar\nbaz", cmd("uses", "--recursive", "foo") + assert_match(/(bar\nbaz|baz\nbar)/, cmd("uses", "--recursive", "foo")) end end |
