- 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
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.
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.
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 7b26c585c2.
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.
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.
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`.
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).
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.
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>
This reverts commit ceed6636d6986bb2b993ba4680ae484deb76ae29.
```
==> git clean -ffdx
HEAD is now at ceed663 test-bot: revise Step output transcoding and XML character filtering
Removing Library/Homebrew/test/.bundle/
Removing Library/Homebrew/test/fs_leak_log
Removing Library/Homebrew/test/vendor/
Error: invalid regular expression: /[^
-uD7FFuE000-uFFFDu{10000}-u{10FFFF}]/
```
Using Ruby 1.8.
Generally it seems user agents are all `software/version` but ours is
not. Also, set the user agent in a way that it's shared between Bash
and Ruby code.
Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
* move shell completion scripts to where can be auto picked up
Let's use switching new remote as opportunity to put shell completion
scripts to where they should be and avoid git conflict during the process.
* add Library/Formula and Library/Aliases symlinks
Formulae and Aliases has been relocated to homebrew/core tap.
The symlinks are pointed to new location to keep backward compatibility.
* remove formula_renames and tap_migrations
They have been replaced by the json files in the core tap.
* update: set new remote
* bump Homebrew version to 0.9.9
This reverts commit 51e4e6490bda0d981afd1787a6392ab588b0601c. This did
not work as intended, as the `git` command is executed in the context of
the tap the current job operates on, never for Homebrew/homebrew itself.
We don't need to migrate the tapped formulae from symlink-based to
directory-based structure any more.
Instead, we add core tap install check for `brew update-report` which
will be invoked by `brew update`.
The API used (`Net::HTTP::Post`) does not handle basic authentication
credentials in the same way as `open` so fix both cases so they work.
Also, do some general usability tweaks to point out to people what could
be wrong with their tokens or credentials to help them debug.
ClosesHomebrew/homebrew#50410.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This can become handy when we separate core code and formulae. For
example, we could use `cd $(brew --repo homebrew/core)` to go to core
tap path.
ClosesHomebrew/homebrew#50346.
Signed-off-by: Xu Cheng <xucheng@me.com>