290 Commits

Author SHA1 Message Date
Mike McQuaid
cc526601cf cmd/update-report: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Mike McQuaid
ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Mike McQuaid
1160d0e347 update-report: also link docs, completions.
These are more files in the HOMEBREW_REPOSITORY that we want to link to
the HOMEBREW_PREFIX.
2016-09-06 09:04:51 +01:00
Mike McQuaid
2682b59b7f update-report: add newline if preinstall updated.
Fixes #858.
2016-09-03 19:36:34 +01:00
Mike McQuaid
3df7daa5bf update-report: also link brew*.1 manpages.
Otherwise if your `HOMEBREW_PREFIX` and `HOMEBREW_REPOSITORY` are not
equal then your tap manpages will be linked but your `brew*` ones will
not.
2016-08-24 11:06:58 +01:00
Mike McQuaid
66d564d885 update-report: tweak Cask migration output.
No longer output every cask under the list of changed formulae but
instead create a dedicated, unprinted report section for casks and then
iterate through that instead.
2016-08-05 16:34:56 +01:00
Mike McQuaid
3f505fe642 update-report: print developer exception backtraces. 2016-08-05 16:34:56 +01:00
Mike McQuaid
a9ab066654 Revert "Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2"
This reverts commit b33b1af073979c8a699ed9688dba37fb7e74f0b5.
2016-08-05 15:28:20 +01:00
Xu Cheng
b33b1af073
Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2 2016-08-05 22:16:19 +08:00
Anastasia Sulyagina
4338f35b84 tap: add cask methods. 2016-08-04 11:37:37 +01:00
Mike McQuaid
ebe8b8d328 update-report: use --overwrite to migrate Casks.
`--force` isn't quite what we want here as it'll just allow keg-only
linkage whereas we want to ensure we overwrite anything the Cask
installed.
2016-08-02 11:48:11 +01:00
AnastasiaSulyagina
be5484da8c update-report: allow Casks migration to formulae.
Closes #588.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-08-02 11:45:47 +01:00
Mike McQuaid
2bd5e0e5ad update-report: tweak cask migration text. 2016-08-02 11:45:32 +01:00
Josh Hagins
4abdeb7b5e update: Don't report formulae that are moved within a tap but not renamed (#480) 2016-07-16 07:18:30 +02:00
Mike McQuaid
0478c2fc0f update-report: prune on cask migration. (#428)
Do this to ensure that any symlinks in the Homebrew prefix and/or in
Applications are removed to stop issues with stale symlinks causing
Casks from being installed correctly.
2016-07-03 14:34:38 -05:00
Mike McQuaid
915eed4c64 update-report: remove unconditional cask/formula uninstall. 2016-06-22 13:50:39 +01:00
Anastasia Sulyagina
2d8b4376df update-report: migrate formulae to casks. (#375) 2016-06-22 13:36:17 +01:00
Mike McQuaid
4a8fcae3cc update-report: improve cache migration messaging. 2016-06-01 13:03:03 +01:00
Mike McQuaid
8108106cf9 update-report: recreate migration_attempted_file.
If the deletion of `HOMEBREW_CACHE` fails then the
`.migration_attempted` file will have still been deleted so ensure it is
recreated.
2016-06-01 12:47:56 +01:00
Mike McQuaid
52ee7bf9e3 update-report: fix Mavericks check. 2016-06-01 09:49:50 +01:00
Mike McQuaid
a9abbab917 Move HOMEBREW_CACHE to ~/Library/Caches (#292)
* cleanup: accept cache as an argument.

* config: move default HOMEBREW_CACHE to ~/Library.

* brew.1: document new default Homebrew cache.

* update-report: migrate legacy Homebrew cache.
2016-06-01 08:46:33 +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
Xu Cheng
98aff27317 add brew analytics command (#173) 2016-05-01 22:04:46 +08: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
Mike McQuaid
4a7cd160c3 Auto-update when running brew install/upgrade.
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-11 09:31:50 +01:00
Xu Cheng
13141de0fd update-report: update for core/formula separation
Update the report logic, since now all formulae are in the taps.
2016-04-02 21:51:36 +08:00
Xu Cheng
56cb3325a6 remove migrate_taps
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`.
2016-04-02 21:51:36 +08:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Xu Cheng
9a4987533a update-report: fix new_full_name in report 2016-02-25 17:27:50 +08:00
Xu Cheng
239c860863 update-report: refactoring
* Better variable/class name. `update-report` isn't response to actual
  update.
* Use abstraction offered by Reporter and ReproterHub class.
* Failure on one tap won't affect migration preformed by other taps.
* Simplify logic and prepare for core/formula separation.
2016-02-25 17:22:28 +08:00
Xu Cheng
95a6067702 update-report: refactoring ReporterHub
* Better variable/class name.
* Remove obsolete update_renamed, this is now handled inside each
  reporter.
* Remove obsolete formula file path to name computation, which is also
  handled by reporter.
* Hide low lever implementation detail to offer better abstraction.
  Use `add(reporter)` instead of `Hash#update` to add new report.
2016-02-25 17:22:28 +08:00
Xu Cheng
849e62c736 update-report: use tap inside Reporter
* Avoid tons of unnecessary file path manipulation. Use abstraction
offered by Tap class if possible.
* Handle formula rename/tap migration inside reporter in per tap basis.
* Avoid duplicated computation.
* Remove redundant/dead code.
2016-02-25 17:22:28 +08:00
Mike McQuaid
21924396f0 update-report: don't duplicate "already updated".
This would be displayed more than once when verbose output was enabled.

Closes Homebrew/homebrew#48469.
2016-01-26 09:09:20 +00:00
Mike McQuaid
ca8bb1a33c update-bash: release to non-developers.
Allow people to run this command (so we can ask people to test it)
without having to set `HOMEBREW_DEVELOPER`.

Closes Homebrew/homebrew#48260.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-25 16:33:52 +00:00
Xu Cheng
fafe8f0f53 update: implement rename_taps_dir_if_necessary in bash
rename_taps_dir_if_necessary must be performed before actual update.
Otherwise, it will report that `HOMEBREW_UPDAET_BEFORE<REPO_VAR>` is
unset.
2016-01-21 21:14:55 +08:00
Xu Cheng
ca59d6fbee update: improve repo_var
* use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX
* better performance:
  * update-bash: avoid shellout
  * update-report: use strip_prefix and tr
* more robust:
  * explicitly handle the case when repo is HOMEBREW_REPOSITORY to avoid
    to handle the trailing backslash.
  * handle both lower case and upper case when stripping non alpha and
    digital characters.
2016-01-21 21:14:55 +08:00
Xu Cheng
826f65cc2f update-report: skip non git tap 2016-01-21 21:14:55 +08:00
Mike McQuaid
99234f0256 Add new update-bash command for testing.
This will become the default updater at a later point in the future.
2016-01-17 19:48:02 +00:00