Darren Kavanagh
a25f827b8f
Report new_tag even when old_tag blank
2022-07-07 14:46:41 -07:00
Darren Kavanagh
387515e75a
State version number in messages
2022-07-07 14:46:40 -07:00
Darren Kavanagh
bc8103d356
Highlight release notes when version changes
...
Highlight release notes when the current version is updated to a newer
version (either major or minor) not just when revision version is zero
(e.g. x.x.0).
2022-07-07 14:46:40 -07:00
Darren Kavanagh
700e2f19f1
Expand output excluded by quiet
2022-07-07 14:46:40 -07:00
Darren Kavanagh
a94f6ec50c
Update latesttag in all cases
...
Set latesttag before it is bypassed by return statement and old_tag
being blank.
2022-07-07 14:46:40 -07:00
Darren Kavanagh
ae2196fa57
Use x_tag instead of x_repository_version
2022-07-07 14:46:39 -07:00
Mike McQuaid
2d5eab2e1c
brew style --fix
2022-06-30 08:56:21 +01:00
Mike McQuaid
3ef6db617a
update-report: always write non-blank lattesttag.
...
This handles this being unset when using `brew update --quiet`.
Fixes #13467
2022-06-24 13:37:32 +02:00
Rylan Polster
b941470216
Merge pull request #13440 from Rylan12/prefer-api-to-taps
...
Always prefer loading from API when `HOMEBREW_INSTALL_FROM_API` is set
2022-06-21 10:18:02 -04:00
Bo Anderson
f77722cfd3
cmd/update-report: fix Style/MapCompactWithConditionalBlock
2022-06-17 19:53:30 +01:00
Bo Anderson
a2033c397e
Use EnvConfig methods over direct ENV access
2022-06-17 19:47:56 +01:00
Rylan Polster
b63474398e
Always prefer loading from API when HOMEBREW_INSTALL_FROM_API
is set
2022-06-17 13:54:05 -04:00
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