3352 Commits

Author SHA1 Message Date
Mike McQuaid
b8e5ff431d audit: check more GitHub URLs. (#256)
GitHub’s code load and patch-diff URLs are the result of redirects and
make it harder to modify the URL to reach the original repository.
2016-05-19 07:56:11 +01:00
Zhiming Wang
bc1d5ae4d4 install: fix documentation of --keep-tmp option (#258)
Obvious copy/paste failure in acc9a7ca8554bc2413dee2d6d0f407b3a59c628c.
2016-05-19 08:43:42 +02:00
Xu Cheng
77836cfb3f fix shellcheck complaint 2016-05-13 14:41:29 +08:00
Xu Cheng
6eb2287221 move git shell function to brew.sh
git is also used in analytics.sh
2016-05-13 14:40:14 +08:00
Xu Cheng
92934db202 move brew shell function to brew.sh 2016-05-13 14:37:18 +08:00
Andrew Janke
2044294a86 brew pull: fix bogus line that was raising warning 2016-05-12 09:09:31 -04:00
Xu Cheng
1b6a200809 update: use lock
Closes #181.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-05-12 15:36:46 +08:00
Dominyk Tiller
745a1312dc pull: insert questionable syntax hack
I'm not completely sure this is "sane" logic but I'm leery of just reverting
Andrew's work this morning and making him rebuild that PR from scratch for one
syntax issue.

Sadly, because we run:
```
brew readall --aliases --syntax
```
On every CI job, and that flags this line previously as:
```
pull.rb:555: warning: possibly useless use of a variable in void context
```

Every single PR has "failed" since it was merged, and it's reached the point
of being a bit annoying, so let's try this.
2016-05-12 00:29:29 +01:00
Andrew Janke
b5a44161a4 cmd/pull: add retry to curl bottle download (#232)
Works around issue with GET and HEAD apparently acting differently, and
bottle downloads failing even after successful polling completion.
2016-05-11 09:52:35 -07:00
Andrew Janke
63ea9295cf brew audit: add --display-filename format option for easy grepping (#221) 2016-05-11 09:19:45 -07:00
Mike McQuaid
5f06312916 cmd/pull: bump retry count. 2016-05-10 09:06:59 +01:00
Mike McQuaid
5c1f463ac0 Move more methods to DevelopmentTools.
Closes #1028.
2016-05-10 08:19:48 +01:00
Martin Afanasjew
500f9eada8 update: fix hyphen counting (legacy tap renaming)
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
Counting the number of hyphens in a string cannot be done in a single
expression, thus split this and introduce another local variable.

Fixes #227.
2016-05-09 21:00:26 +02:00
Martin Afanasjew
93e0f4f946 update: remove stray comma (legacy tap renaming)
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
2016-05-09 21:00:09 +02:00
Martin Afanasjew
5a90e7190b fetch: document --retry option (#225) 2016-05-09 15:37:01 +02:00
Jam
a558629654 gist-logs: add proper documentation, improve error handling (#217) 2016-05-09 04:39:22 +02:00
Mike McQuaid
c7edf9a063 gist-logs: fix system_config reference. 2016-05-08 20:38:17 +01:00
Mike McQuaid
59de2c7ecf pull: fix bottle_tag references. 2016-05-08 17:18:19 +01:00
Mike McQuaid
bb72260606 tests: add generic flag. (#212)
Makes it easier to quickly do tests of the generic/cross-platform
backend.
2016-05-08 17:12:14 +01:00
Mike McQuaid
9e7b8c61a9 Make config command cross-platform.
Closes #168.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-05-08 16:51:22 +01:00
Mike McQuaid
931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Andrew Janke
12686ad417 cmd/fetch: fix typo in doco 2016-05-06 11:03:38 -04:00
Mike McQuaid
1c1c48c920 test-bot: only push once when uploading. 2016-05-06 11:00:22 +01:00
Martin Afanasjew
742df8bbf4 Reorder usage examples for brew help
- Reorder listed commands to better reflect a typical workflow (search,
  then query for details via `info` and friends, then install, later
  update and upgrade, at last maybe uninstall).
- Remove niche `pin` and `unpin` commands.
- Drop `--env` in the Troubleshooting section.

And use `/REGEX/` instead of `/PATTERN/` to be clearer what is expected.

Closes #177.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-05 23:35:54 +02:00
Martin Afanasjew
f653cb8340 pull: fix references to renamed variable
Fix bug originating in #132.
2016-05-04 02:46:21 +02:00
Martin Afanasjew
6fdcab5abc deps: split and clarify documentation
`brew deps` has three different modes of operation that were not easy to
infer from the existing documentation. Split the help text into three
parts to make this clearer. This also improves on the confusion when
options were silently ignored because they don't apply to a certain mode
of operation. Those are:

1. List the shared dependencies (either intersection or union) of
   explicitly named formulae with options for traversal depth/order.

2. Output separate trees of explicitly listed or all installed formulae.

3. List all available/installed formulae and their direct dependencies
   with one line per formula formatted as `<formula>: <dependencies>`.

Closes #137.

Closes #179.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-03 17:19:18 +02:00
Andrew Janke
bf23ba1d1e pull: fix polling code for Ruby 1.8.7 Net::HTTP (#191) 2016-05-03 10:30:01 -04:00
Mike McQuaid
70096f8e91 update.sh: abort rebase and merge.
`brew update` can cause these so `brew update` should repair these.
2016-05-03 15:28:00 +01:00
Mike McQuaid
60e3737f17 update: improve some edge cases.
- When running `brew update` and there’s been no changes from upstream
on any repositories there’s no need to call the (relatively) slow `brew
update-report` when we already know what it will say (“Already up-to
date.”).
- When any`git fetch`es fail then throw out an error at the end of the
output and produce a failing exit code (closes #65).
2016-05-03 14:24:41 +01:00
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