4756 Commits

Author SHA1 Message Date
Darren Kavanagh
da4bf679de
Add new line after donate message 2022-07-07 14:46:41 -07:00
Darren Kavanagh
b878d9c1ca
Highlight new revision message 2022-07-07 14:46:41 -07:00
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
Bo Anderson
7390022b0e
cmd/update.sh: fix race condition reporting fetch failures 2022-07-01 17:35:34 +01:00
Mike McQuaid
2d5eab2e1c
brew style --fix 2022-06-30 08:56:21 +01:00
Rylan Polster
4310674776
Require an argument to --bottle-tag in fetch and --cache 2022-06-28 11:20:22 -04: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
Rylan Polster
5d3501f6b4
Merge pull request #13428 from hyuraku/repair-brew-outdated-greedy
repair `brew outdated --greedy` to show only casks
2022-06-20 13:33:28 -04:00
hyuraku
52279d588d repair description 2022-06-20 23:42:44 +09:00
hyuraku
0de4855bd8 improve description 2022-06-20 21:33:17 +09:00
Bo Anderson
f77722cfd3
cmd/update-report: fix Style/MapCompactWithConditionalBlock 2022-06-17 19:53:30 +01:00
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
a2033c397e
Use EnvConfig methods over direct ENV access 2022-06-17 19:47:56 +01:00
Bo Anderson
f5dc7a571f
Fix Style/ObjectThen offences 2022-06-17 19:47:55 +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
Rylan Polster
a6e8049f85
Merge pull request #13439 from Rylan12/dev-cmd-with-install-from-api
Allow more developer commands with `HOMEBREW_INSTALL_FROM_API`
2022-06-17 13:15:24 -04:00
Bo Anderson
aaa733448e
Merge pull request #13436 from Bo98/update-report-fix
cmd/update-report: fix error if new formulae/casks are already installed
2022-06-17 02:49:41 +01:00
Rylan Polster
b896f6cb0d
Allow more developer commands with HOMEBREW_INSTALL_FROM_API 2022-06-16 21:31:15 -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
Rylan Polster
f724dde6bb
Fix style 2022-06-16 15:37:33 -04:00
Rylan Polster
98f8a86af3
Clarify TODO in brew update
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-06-16 15:34:04 -04:00
Rylan Polster
cff0122fc4
Remove unnecessary HOMEBREW_INSTALL_FROM_API checks 2022-06-15 16:35:50 -04:00
Rylan Polster
1e536217b2
Streamline loading casks from API 2022-06-15 16:35:49 -04:00
hyuraku
f0d29d6d49 repair brew outdated --greedy 2022-06-15 21:53:15 +09:00
Rylan Polster
43f7fa4162
Update cached formula json file when needed 2022-06-14 16:11:23 -04:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
Bo Anderson
1d36c42fb7
Support offline usage under HOMEBREW_INSTALL_FROM_API 2022-06-14 16:06:05 -04: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
Bo Anderson
01a93edac3
Portable Ruby 2.6.8_1 2022-06-03 18:00:16 +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
Bo Anderson
14870406e0
Merge pull request #13253 from xxyzz/delete-force-update
Add `--no-force-auto-update` option to `brew tap`
2022-05-11 03:23:17 +01:00
xxyzz
2e899da7c7
Add --no-force-auto-update option to brew tap
Enable this option to delete `homebrew.forceautoupdate` git config option
2022-05-11 07:17:17 +08:00
Alex Balgavy
b886b2d1f7
Remove mentions of nonexistent command brew diy
The output of `brew doctor` can mention a command `brew diy`, which no
longer exists.
2022-05-06 10:22:25 -04:00
Bob Lail
c715ea7fd1 Document the --quiet flag on brew update 2022-05-04 10:52:19 -05:00
Carlo Cabrera
c586aeffc8
cmd/info: use Formula.all
Fixes #13241.
2022-05-04 16:41:25 +08:00
Maxim Belkin
13735bc780
Apply Mike's suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-04-26 08:35:28 -07:00
Maxim Belkin
27a2dba340
update/update-reset: warn when no origin remote
Current situation with update.sh & update-reset.sh:

Upon creating a new tap and before adding remote 'origin' to it,
running `brew update` produces multiple cryptic error messages.
This change converts these cryptic Git messages into clear warnings
about absent remote 'origin'.

How to test:
1. Create a new tap using `brew tap-new`
2. Run `brew update`
2022-04-26 08:35:27 -07:00
apainintheneck
f811774cab Display old and new version numbers when updating 2022-04-14 11:58:19 -07:00
EricFromCanada
8a7f082b30
list: output only if installed casks are passed
Fixes #13139.
2022-04-13 10:50:50 -04:00
Issy Long
a8ce086844
Merge pull request #13116 from issyl0/reinstall-cask-zap
cask/reinstall: Support `--zap` for entirely purging cask files
2022-04-12 10:37:58 +01:00
Issy Long
0b6b2f04da
cask/reinstall: Support --zap for entirely purging cask files
- The `brew uninstall` command has `--zap`, so let's make `brew
  reinstall` have parity here for a better user experience. (Requested
  in issue 12983.)
- It feels weird that to get my new reinstall test to pass I had to add
  `--zap` to `cask/cmd/install.rb`, not `cask/cmd/reinstall.rb` to get
  the tests to pass. But the `brew reinstall --cask caffeine --zap`
  command worked fine all the time. The CLI argument parser from the
  test run was complaining about not knowing what `zap` was. As a
  result, `--zap` now shows up as a switch in `brew install --help`
  which I'm not 100% convinced is the desired UX. But I've edited the
  description accordingly to specify that it will only work on
  `reinstall` operations (and `--zap` on `install` is a no-op).

```
issyl0 at pictor in /opt/homebrew on reinstall-cask-zap
❯ brew reinstall --cask caffeine --zap
==> Downloading https://github.com/IntelliScape/caffeine/releases/download/1.1.3/Caffeine.dmg
Already downloaded: /Users/issyl0/Library/Caches/Homebrew/downloads/3d6ccfdd3b8d0ab37d1c2468d6e69078c2d31d3b12bf51947c4db21e5f376af2--Caffeine.dmg
==> Implied `brew uninstall --cask caffeine`
==> Backing App 'Caffeine.app' up to '/opt/homebrew/Caskroom/caffeine/1.1.3/Caffeine.app'
==> Removing App '/Applications/Caffeine.app'
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/com.intelliscapesolutions.caffeine
~/Library/Preferences/com.intelliscapesolutions.caffeine.plist
~/Library/Caches/com.intelliscapesolutions.caffeine
~/Library/HTTPStoages/com.intelliscapesolutions.caffeine.binarycookies
==> Removing all staged versions of Cask 'caffeine'
==> Installing Cask caffeine
==> Moving App 'Caffeine.app' to '/Applications/Caffeine.app'
🍺  caffeine was successfully installed!
```
2022-04-09 16:37:23 +01:00