3122 Commits

Author SHA1 Message Date
Andrew Janke
798c342f4e brew pull: cross-platform bottle verification, concise output (#132)
Do the bottle check using any platform's bottle, so `brew pull` works
on bottled formulae which don't include a bottle for the current system.

Make output more concise and informative
 * Remove expected download error messages when waiting for Bintray publishing
 * Replace patch download progress bars with patch file name
 * Silence git output about switching to and from bottle-pulling branch
 * Include formula name and patch type in some progress messages
2016-05-03 08:22:28 -04:00
Andrew Janke
2805531f13 audit: fix false-positive for '--with-check' from 'depends_on "check" => :optional' (#188)
Fixes #170
2016-05-03 08:16:20 -04:00
Mike McQuaid
f288b66fcb update.sh: remove GIT_ASKPASS=false.
This doesn't work as expected and causes confusing user errors.

References #95.
2016-05-03 09:04:23 +01:00
Martin Afanasjew
02289fce42 Update Homebrew/homebrew references in code
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Martin Afanasjew
8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Xu Cheng
67944c2f2d update: escape ? in the help flag list
Otherwise it will match any character
2016-05-02 21:04:30 +08:00
Xu Cheng
3b40dcedf8 update: more help flag (#180)
To be synced with the help flag list in brew.rb
2016-05-02 17:58:41 +08:00
Xu Cheng
98aff27317 add brew analytics command (#173) 2016-05-01 22:04:46 +08:00
Christian Moritz
9378e46ffc audit: whitelist kibana from Language::Node check (#161) 2016-04-27 22:00:41 +01:00
Christian Moritz
bc98fd3788 Language::Node.npm_install_args: add helper method (#37)
* add Language::Node helper module

This adds a language module for Node module based formulas.
It contains the 2 public methods `std_npm_install_args(libexec)` and
`local_npm_install_args`:

* `std_npm_install_args` is intended to be used in formulas for
  standard node modules and returns `npm install` args for a global
  style module installation to libexec.
* `local_npm_install_args` is for formulas, in which the `npm install`
  step is only one of multiple parts of the installation process and
  returns `npm install` args for a default local installation in place.

Both methods have in common, that they are

* making sure that a working copy of npm and node-gyp from node's
  libexec is prepended to the PATH (to not rely of a user managed npm)
* seting the npm cache to HOMEBREW_CACHE/npm, which fixes issues caused
  by overriding $HOME resulting in long install times + high disk usage
  (see https://github.com/Homebrew/brew/pull/37#issuecomment-208840366)

* audit: update npm install check for Language::Node

* cleanup: remove npm_cache too

* doc: add Node-for-Formula-Authors.md
2016-04-27 17:08:44 +01:00
Andrew Janke
05efd70dc3 Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
2016-04-26 04:28:38 -04:00
Mike McQuaid
df489cfde2 More analytics tweaks.
Provide a single command that can be run to disable analytics, run it if
`HOMEBREW_NO_ANALYTICS` is ever set and remove the user UUID file in
that case too.

References https://github.com/Homebrew/brew/issues/142.
2016-04-25 18:51:00 -05:00
Mike McQuaid
421cd5365f Point to analytics documentation on brew update.
Make sure that users are notified on the first run of `brew update`
after we enabled analytics about how it works and how to opt-out. This
will be shown to all users who have not already seen this message from
`brew update` or through a new Homebrew installation.

References https://github.com/Homebrew/install/pull/42
References https://github.com/Homebrew/brew/issues/142
2016-04-25 18:05:30 -05:00
Misty De Meo
a662bd4470 config: return early if java_home is missing
Fixes mistydemeo/tigerbrew#365.
2016-04-22 22:37:21 -07:00
Mike McQuaid
2921795668 update: rebase (rather than merge) by default.
We want to always avoid merge commits being committed to Homebrew so
this feels like a better fit.
2016-04-22 10:06:59 +01:00
Martin Afanasjew
b5c27bb7e5 readall: also check 'brew.rb' for issues
Closes #119.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-22 00:47:43 +02:00
Martin Afanasjew
30c0d97e5c readall: stop using no longer needed 'nostdout'
Since switching from `system` to `Utils.popen_read` we no longer need to
suppress Ruby's output of `Syntax OK` to `$stdout`.
2016-04-22 00:47:43 +02:00
Martin Afanasjew
a61829da46 readall: fail on Ruby syntax warnings
Previously, syntax warnings were printed, but didn't cause `readall` to
exit with a non-zero exit code. Now they do, making it easier to catch
accidentally introduced syntax warnings in the test bot.
2016-04-22 00:47:43 +02:00
Andrew Janke
a3b70d38a7 brew-audit: pull style checks in to main audit output
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.

Closes #112.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 14:45:33 -04:00
Martin Afanasjew
cf3486f98a help: show command-specific help for invalid usage
Instead of always printing the generic help text, print command-specific
help if it is available and a command raised the `UsageError` exception.
Put the error message underneath the help text (was above) to avoid that
it scrolls off the screen.

Thereby fix a regression where handling the invalid usage would fail to
access `ARGV.usage` removed in c6536066dc39da653d265640c6ba6046bb5def98.
2016-04-20 13:46:10 +02:00
Martin Afanasjew
557ad956fd help: refactor (again) and fix code style issues
Turns out making `empty_argv` a boolean argument for `Homebrew.help` was
not the best idea and having command-to-path mapping and help extraction
in a single method is not flexible enough.

Also only complain about missing help text when `HOMEBREW_DEVELOPER=1`
and otherwise just print the generic help text.
2016-04-20 13:46:10 +02:00
Martin Afanasjew
4f8e3cae5e help: improve styling of generic help text
Format the usage examples more consistently (particularly parentheses
instead of square brackets where one of several alternatives has to be
picked). And add the now much more useful `brew help <command>`.

Closes #113.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-20 13:45:26 +02:00
Martin Afanasjew
312fdaa892 --version: move help to documentation comment
This implies that `--version` is treated in most places like a regular
command, e.g. being suggested in shell completion. Also fix the help
text that claimed output goes to standard error, while it actually goes
to standard output.
2016-04-20 13:45:26 +02:00
Martin Afanasjew
76f0479969 --repository: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
6931e9421a --prefix: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
a3352c000e --env: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
046b481806 --cellar: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
bab823288f --cache: move help to documentation comment 2016-04-20 13:45:26 +02:00
Martin Afanasjew
d29d58b3fb man: put option-style commands after regular ones 2016-04-20 13:45:26 +02:00
Xu Cheng
0949a6955a man: fix Ruby syntax warning
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands

Closes #116.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19 22:44:38 +08:00
Xu Cheng
799d3aec15 test-bot: simplify the logic
Closes #115.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19 16:29:29 +08:00
Xu Cheng
9b79f45e94 Revert "man: fix Ruby syntax warning"
This reverts commit 2caf7b76bb3e09ffabf8c56d3934ba8190673fdc.
2016-04-19 15:25:44 +08:00
Xu Cheng
2caf7b76bb man: fix Ruby syntax warning
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands
2016-04-19 15:08:34 +08:00
Xu Cheng
5d1e648194 test-bot: prevent infinite loop caused by unavailable formula.
Noted, `brew tap foo` will not fail if the tap is already installed.
2016-04-19 14:21:42 +08:00
Andrew Janke
da34fba151 test-bot: check all dependents for broken dylibs
Pulls 'brew linkage' in to main brew repo as a dev-cmd, and has test-bot
use it to detect dylib breakage, which usually means a revision bump is
needed. Checks all dependents, not just those with a 'test do' block
defined, since we can do this without formula support.

Closes #107.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 13:37:34 -04:00
Dominyk Tiller
c3c233dd80 test-bot: don't untap during cleanup_before 2016-04-18 17:54:41 +01:00
Dominyk Tiller
46cfc9826c test-bot: purge non-core taps at start/end of job (#109)
e70a3552d3 seems to have
exacerbated the problem where taps stick around and then `brew uses` gets executed
on a whole host of taps, which is currently breaking almost every PR for formulae
that would be used cross-tap, as well as causing lengthier CI builds.

Examples from the last week or so include sqlite, V8, protobuf, and so on. Whilst it
may be true that cross-tap formulae failing can show problems that need looking at,
a lot of the time the failures are unrelated to the build in question and just
leave contributors confused on what needs to be done, or why their PR is failing
for something that seems entirely unrelated.

You can see the taps failing to vanish locally by doing something like:

```
brew tap homebrew/fuse
brew tap homebrew/versions
cd $(brew --prefix) && git clean -ffdx --exclude=/Library/Taps/
brew tap
...
homebrew/core
homebrew/fuse
homebrew/versions
```

This is a very simple proposal to handle the problem, but there's no real reason
I couldn't write this functionality into untap itself and then we call that in
test-bot. Just didn't necessarily want to jump immediately to expanding the untap
command to solve what is more-or-less a CI problem.
2016-04-18 17:39:52 +01:00
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.

Closes #66.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18 12:23:08 -04:00
Martin Afanasjew
c6536066dc ARGV: remove unused 'usage' method
Also remove related helper method `Homebrew.help_s`.
2016-04-18 00:52:32 +02:00
Martin Afanasjew
3503806e77 help: handle help output (move from 'brew.rb')
Keep the footprint of `brew.rb` small. Handle fetching/displaying an
appropriate help text (taking into account various external conditions)
in the `help` command.
2016-04-18 00:52:32 +02:00
Martin Afanasjew
94a627d7aa install: handle FormulaClassUnavailableError
Don't search for alternatives if formula was found, but has issues, as
this will create confusing output, particularly for contributors working
on a formula file.
2016-04-17 21:16:01 +02:00
Martin Afanasjew
3680c4667f man: replace split header/footer with ERB template 2016-04-17 20:43:27 +02:00
Martin Afanasjew
d8e427577d man: pipe markup to 'ronn' to avoid temporary file 2016-04-17 20:43:27 +02:00
Martin Afanasjew
291ff3cc42 man: refactor and fix code style
Split monolithic method into more manageable chunks and fix code style.
2016-04-17 20:43:27 +02:00
Martin Afanasjew
8e42077a8e list: exclude zsh completions from unbrewed
Since edf000e4cd30c3626ccc28c52ed32f2d84a200dd `zsh` completions are in
`share/zsh/site-functions/_brew`, making this path a part of Homebrew.
Hide it from `brew list --unbrewed` to reduce confusion/noise.
2016-04-17 00:13:17 +02:00
Cory Donnelly
bad28dc546 audit.rb: Base desc length check on short name
Currently, brew audit --strict includes the name of the tap when calculating the
length of a formula's description. This makes it difficult to pass the audit for
formulas in taps with lengthy names. In #47033 @jawshooah called out head-only
or devel-only taps specifically, but this is an issue elsewhere. For example:

homebrew/versions/elasticsearch20: Distributed search & analytics engine (72)

This commit updates audit.rb to use formula.name rather than formula.full_name.

Closes #47033 -- Audit shouldn't include tap name in description length
2016-04-16 16:14:15 +02:00
Xu Cheng
a8be17df57 test-bot: update for new deps/uses options
Closes #92.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-16 21:47:47 +08:00
Xu Cheng
7ba9eabc14 uses/deps: default to skip optional/build deps.
Also add options to include optional/build deps and an option
to skip recommended deps.

Closes Homebrew/legacy-homebrew#50066.
2016-04-16 21:47:47 +08:00
Dominyk Tiller
b70e4341fe style: use rubocop 0.39
(#85)
2016-04-14 14:44:23 +01:00
Mike McQuaid
891dcc7c27 update: use official GitHub SHA API. (#75)
This is coming out of preview shortly so use the new API content-type.
2016-04-12 11:12:23 +01:00