224 Commits

Author SHA1 Message Date
Bo Anderson
a6c6c4b915
cmd/update-report: fix error if new formulae/casks are already installed 2022-06-17 00:30:49 +01:00
Mike McQuaid
78695938ae
cmd/update-report: always output new formulae.
There's near zero performance overhead and this seems good for
discovery.

Fixes #13412
2022-06-13 09:12:32 +01:00
apainintheneck
0020a57987 Split dump_formula_or_cask_report into multiple functions 2022-06-12 08:55:21 -07:00
apainintheneck
e0a6743580 HOMEBREW_UPDATE_REPORT_ALL_FORMULA displays new formulae and casks
Only show new formulae or casks when HOMEBREW_UPDATE_REPORT_ALL_FORMULAE
environment variable is set.

Stop checking for HOMEBREW_UPDATE_REPORT_ALL_FORMULAE when the key is
:R, :A or :AC in ReporterHub#dump_formula_or_cask_report because
that check is made redundant by the check in ReporterHub#dump.
2022-06-11 15:58:51 -07:00
Mike McQuaid
04c8e02418
cmd/update-report: use better wording where appropriate.
From reading https://github.com/orgs/Homebrew/discussions/3328: I
initially thought we should just change "Updated" to "Modified" when
appropriate. After conversation with Bo98, though, I thought more and
saw that we're already checking for outdated formulae here so, rather
than ever traverse through the formula history, look at the outdated
formula and list them unless we've set
`HOMEBREW_UPDATE_REPORT_ALL_FORMULAE` in which case we show the
modifications.

While we're here, also do a bit of reformatting and renaming to better
clarify intent.
2022-06-03 19:23:38 +01:00
Mike McQuaid
fb4c9353bb
Improve updating behaviour
- Rename use of "preinstall" to "auto update". The original "preinstall"
  naming came from the fact that we used to only auto-update before
  `brew install` but now that it's many commands: this is more confusing
  than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
  `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
  and the prior provides an opt-out for better output, performance and
  avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
  versions by default for better performance by default.

Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-05-19 11:04:20 -04:00
apainintheneck
f811774cab Display old and new version numbers when updating 2022-04-14 11:58:19 -07:00
EricFromCanada
2fdc70c3bf
desc, search: also search cask descriptions 2022-03-30 11:23:55 -04:00
Mike McQuaid
47f8636e7d
update-report: optimise update_report_only_installed code. 2022-02-28 09:58:20 +00:00
Mike McQuaid
d48a9337e4
Revert "update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on." 2022-02-28 09:54:12 +00:00
Mike McQuaid
10d5266361
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
This avoids reading formula files that the user hasn't explicitly
installed which both speeds up `brew update` and improves the security.
2022-02-22 10:01:24 +00:00
Mike McQuaid
3a709d36b2
Start process to remove Enumerable from Formula and Cask::Cask.
This is the first step to address
https://github.com/Homebrew/brew/issues/11292.
2022-01-03 14:59:10 +00:00
Xuehai Pan
62a63063bb Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn>
2021-11-24 01:06:27 +08:00
XuehaiPan
466f29a16a cmd/update-report: redirect stdout to stderr when it is not a TTY 2021-11-23 23:55:06 +08:00
Mike McQuaid
25e61f65db
cmd/update-report: check core tap is installed.
Otherwise `CoreTap.instance.linuxbrew_core?` can fail.
2021-10-25 16:52:29 +01:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Rylan Polster
8193807f8d
update-report: fix unset cask repo variable error 2021-10-21 18:33:44 -04:00
Mike McQuaid
0118e6ec41
Apply suggestions from code review
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com>
2021-10-21 15:10:17 +01:00
Mike McQuaid
eb1b244fd2
update-report: better handle user set bottle domain, core git remote.
Unset these variables and print a warning if they were set to
non-default values.
2021-10-21 15:01:58 +01:00
Michka Popoff
1cc7ca33c0
update: migrate everyone from linuxbrew-core to homebrew-core
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-20 11:01:38 +01:00
Michka Popoff
e8ee5b05f9
Migrate linuxbrew-core to homebrew-core on update.
- Only for HOMEBREW_DEVELOPER
- Except for HOMEBREW_CORE_MERGE_MAINTAINER
- Except for GitHub Actions CI

Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-11 21:04:58 +02:00
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Rylan Polster
aaaf92b905
update-report: still report homebrew/core changes if they are updated 2021-07-17 12:48:02 -04:00
Rylan Polster
a1ecb02736
update-report: don't try to report Homebrew/core if not needed 2021-07-16 11:35:51 -04:00
Rylan Polster
60203afdd5
Merge env variables into HOMEBREW_JSON_CORE 2021-06-18 12:10:26 -04:00
Rylan Polster
1d516b628b
Use #present? and #blank? to check env variable 2021-06-18 12:07:34 -04:00
Rylan Polster
2760d981d3
Allow for homebrew/core to be untapped 2021-06-17 14:18:43 -04:00
hyuraku
427859795a cmd/update-report: change ENV 2021-05-06 10:03:21 +09:00
Mike McQuaid
5f707d13d8
cmd/update-report: tweak outdated language.
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2021-04-02 12:16:39 +01:00
hyuraku
89868087fd repair the message 2021-04-01 22:01:04 +09:00
hyuraku
4e4886ff42 update-report: add how to check the outdated 2021-04-01 00:00:49 +09:00
Mike McQuaid
dcfd4c2beb
cmd/update-report: tweak syntax. 2021-03-28 02:20:56 +01:00
Darren Kavanagh
92a42381df
Add additional quiet check in update-report 2021-03-28 02:20:55 +01:00
Darren Kavanagh
b66b461811
Expand quiet checks in update and update-report 2021-03-13 10:08:06 -08:00
Dustin Rodrigues
81e3aa899d
update-report: use appropriate pronoun in update message 2021-02-19 11:58:01 -05:00
Bo Anderson
0e732d3917 cmd/update-report: report outdated count & suggest brew upgrade 2021-02-10 15:36:38 +00:00
Mike McQuaid
72cb6ffd12
utils: import {ohai,puts}_stdout_or_stderr
Fixes #10536
2021-02-05 15:03:31 +00:00
Mike McQuaid
dbf65770af
cmd/update-report: output to stderr when not a TTY.
Otherwise things like `$(brew bundle list --formula)` become a bit
useless as they can auto-update and then will always fail.
2021-02-03 13:31:24 +00:00
Rylan Polster
84fc16c1c1
Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2021-01-28 09:10:14 -05:00
Rylan Polster
f508f8dc0c
update: show message prompting brew tap --repair
This message is shown when a fetch fails due to a branch rename
2021-01-28 09:10:13 -05:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
571179ff0e pass second argument to ohai when applicable 2021-01-26 15:36:43 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Rylan Polster
f1f3fdc315 settings: add module for managing git config settings 2021-01-12 16:27:25 -05:00
Rylan Polster
e7b369273a completions: link official taps automatically 2021-01-11 12:27:57 -05:00
Rylan Polster
234267cc93 completions: make opt-in only 2021-01-08 11:10:24 -05:00
hyuraku
64d4eb2425 cmd/update-report: fix to show new tag 2021-01-01 17:54:59 +09:00
Rylan Polster
80d8b419de update-report: update blog post link 2020-12-28 10:56:07 -05:00
Rylan Polster
5b360f35c5 update-report: use gitconfig to remember last tag 2020-12-25 14:14:57 -05:00
Rylan Polster
a0e663d833 update: show either changelog or release noted link 2020-12-24 19:05:23 -05:00