aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
AgeCommit message (Collapse)Author
2016-04-20help: refactor (again) and fix code style issuesMartin Afanasjew
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-20help: improve styling of generic help textMartin Afanasjew
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--version: move help to documentation commentMartin Afanasjew
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--repository: move help to documentation commentMartin Afanasjew
2016-04-20--prefix: move help to documentation commentMartin Afanasjew
2016-04-20--env: move help to documentation commentMartin Afanasjew
2016-04-20--cellar: move help to documentation commentMartin Afanasjew
2016-04-20--cache: move help to documentation commentMartin Afanasjew
2016-04-20man: put option-style commands after regular onesMartin Afanasjew
2016-04-19man: fix Ruby syntax warningXu Cheng
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands Closes #116. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19test-bot: simplify the logicXu Cheng
Closes #115. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-19Revert "man: fix Ruby syntax warning"Xu Cheng
This reverts commit 2caf7b76bb3e09ffabf8c56d3934ba8190673fdc.
2016-04-19man: fix Ruby syntax warningXu Cheng
Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands
2016-04-19test-bot: prevent infinite loop caused by unavailable formula.Xu Cheng
Noted, `brew tap foo` will not fail if the tap is already installed.
2016-04-18test-bot: check all dependents for broken dylibsAndrew Janke
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-18test-bot: don't untap during cleanup_beforeDominyk Tiller
2016-04-18test-bot: purge non-core taps at start/end of job (#109)Dominyk Tiller
https://github.com/Homebrew/brew/commit/e70a3552d3faddd0afd2535a03c31b8c50be901a 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-18brew test, install, update-test: add --keep-tmp optionAndrew Janke
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-18ARGV: remove unused 'usage' methodMartin Afanasjew
Also remove related helper method `Homebrew.help_s`.
2016-04-18help: handle help output (move from 'brew.rb')Martin Afanasjew
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-17install: handle FormulaClassUnavailableErrorMartin Afanasjew
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-17man: replace split header/footer with ERB templateMartin Afanasjew
2016-04-17man: pipe markup to 'ronn' to avoid temporary fileMartin Afanasjew
2016-04-17man: refactor and fix code styleMartin Afanasjew
Split monolithic method into more manageable chunks and fix code style.
2016-04-17list: exclude zsh completions from unbrewedMartin Afanasjew
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-16audit.rb: Base desc length check on short nameCory Donnelly
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-16test-bot: update for new deps/uses optionsXu Cheng
Closes #92. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-16uses/deps: default to skip optional/build deps.Xu Cheng
Also add options to include optional/build deps and an option to skip recommended deps. Closes Homebrew/legacy-homebrew#50066.
2016-04-14style: use rubocop 0.39Dominyk Tiller
(#85)
2016-04-12update: use official GitHub SHA API. (#75)Mike McQuaid
This is coming out of preview shortly so use the new API content-type.
2016-04-12Homebrew (opt-in) Analytics tweaks. (#57)Mike McQuaid
- add `HOMEBREW_PRODUCT` global variable - only differentiate between `/usr/local` and `non-/usr/local` Homebrew prefixes to avoid sharing sensitive user information - note if e.g. build errors are occurring under CI - Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out when this is enabled for everyone) - Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics that are sent - Move Bash analytics code to `Library/Homebrew/utils/analytics.sh` - Add documentation for our analytics and why/what/when/how and opt-out - Only official Homebrew commands are reported - Ruby analytics are now reported in a forked, background process
2016-04-12help: support highlighted outputXu Cheng
Closes #68. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-04-12help: handle aliasXu Cheng
Before this fix ``` $ brew --help ls Error: Unknown command: ls ``` After this fix ``` $ brew --help ls brew list, ls <snip> ```
2016-04-11Auto-update when running `brew install`/`upgrade`.Mike McQuaid
Also, slightly tweak the behavior of `brew update` in this case so that it doesn't print annoying output and still allows the `brew edit` flow for people with `HOMEBREW_DEVELOPER` set.
2016-04-10Fix documentation errorMax Nordlund
Closes #10. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-10Add all the top level commentsMax Nordlund
2016-04-10Implement the `brew help` commandMax Nordlund
This is also used by `brew <cmd> --help`. The basic idea is to have the documentation as a top level comment in each command file. To find these comments, they have to be like this `#:`. This is also used by the `brew man` command to keep the documentation DRY, and for that there are now a header and footer for the man page.
2016-04-07always prefer HOMEBREW_CURL over plain 'curl'Martin Afanasjew
2016-04-06test-bot: add safety margin to output truncation sizeAndrew Janke
2016-04-06test-bot: stop using --recursive for `brew uses`Dominyk Tiller
We're not sure this is working as it was intended to, and the primary end product so far has been making every Ruby 1.8.7 build, which is the Ruby we use on Mavericks for compatibility, take 5-15 minutes longer per build than 2.x Rubies. Cumulatively this is responsible for the vast majority of CI slowness over the last couple months as Mavericks plays catch-up and everything else waits for it to do so. We may revisit this in future, but for now the harm is greater than the "risk". This technically reverts https://github.com/Homebrew/brew/commit/7b26c585c2a26ec0dad201852ca4934c77fcc493.
2016-04-06prune: handle broken app symlinksMartin Afanasjew
Remove broken symlinks from `/Applications` and `~/Applications` that were previously created by `brew linkapps`, but are no longer valid because formulae were uninstalled or the provided apps have changed.
2016-04-06unlinkapps: add --dry-run optionMartin Afanasjew
Add `--dry-run` option as is customary for destructive commands. Update `bash` completion and man page accordingly. Also correct and update documentation for both `brew linkapps` and `brew unlinkapps` in more general terms.
2016-04-06unlinkapps: modernizeMartin Afanasjew
Simplify code by using `Pathname` methods as much as possible. Also avoid calling external commands for basic functionality like unlinking, reduce code duplication by using a method from `cmd/linkapps.rb`, count unlinked symlinks with `ObserverPathnameExtension`, and adjust output for consistency with `brew linkapps`.
2016-04-06linkapps: modernizeMartin Afanasjew
Simplify code by using `Pathname` methods as much as possible. Also avoid calling external commands for basic functionality like symlink creation, refactor code that can be shared with `brew unlinkapps`, and print a summary line at the end (if symlinks were created).
2016-04-06test-bot: fix access to relocated methodMartin Afanasjew
Fix bug introduced in a2c23dfec569c6e73d90cb20c7d4c26cced258d5. Moving this method apparently made it inaccessible from `Homebrew::Step`.
2016-04-06test-bot: fix undefined method errorMartin Afanasjew
The method `fix_encoding!` is private to `Homebrew::Step` but is also required by the `Homebrew.sanitize_output_for_xml` method for truncating overly long logs. Move `fix_encoding!` into the `Homebrew` module to make it accessible from both this method and the `Homebrew::Step` class. This amends commit 343091c828d1e572829b86253d79b326c1986bcd.
2016-04-05audit: require plist_options when using plistDominyk Tiller
Closes #19. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-04-05audit: check plist placementDominyk Tiller
2016-04-05Merge pull request #27 from apjanke/test-bot-xml-filterAndrew Janke
test-bot: revise Step output transcoding and XML character filtering
2016-04-05tap: support --full even if installedilovezfs
Makes `tap` re-runnable and unshallows when requested with `--full`. Tapping with a different URL raises an exception. The homebrew/core tap cannot be untapped with `untap` so running `brew tap --full homebrew/core` is now a built-in way to get a full clone of this tap without resorting to workarounds. Closes #17. Signed-off-by: ilovezfs <ilovezfs@icloud.com>