264 Commits

Author SHA1 Message Date
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