On OS X I can check which version of homebrew I have installed with brew -v
. Is there a way to check what the latest version available for installation is?
CodePudding user response:
You can check the git release notes with
$ curl -s "https://github.com/Homebrew/brew/releases" |
awk '/true" /{gsub(/<\/a.*|.*">/, "", $NF); print $NF}' |
head -1
3.6.12
or, if you want a longer history with date-times.
$ curl -s "https://github.com/Homebrew/brew/releases" |
awk '/relative-time.*prefix="" datetime/{sub(/T/, " ", $NF)
gsub(/.*e="|">/, "", $NF); date = $NF}
/true" /{gsub(/<\/a.*|.*">/, "", $NF)
print $NF"\t"date}'
3.6.12 2022-11-21 14:24:13Z
3.6.11 2022-11-14 14:35:38Z
3.6.10 2022-11-09 17:03:46Z
3.6.9 2022-11-07 14:22:45Z
3.6.8 2022-11-01 12:20:01Z
3.6.7 2022-10-24 12:27:21Z
3.6.6 2022-10-17 13:29:39Z
3.6.5 2022-10-10 11:37:32Z
3.6.4 2022-10-03 09:09:57Z
3.6.3 2022-09-26 13:06:10Z
CodePudding user response:
You can always run brew update
to update your brew
and formulae.
$ brew update --help
Usage: brew update [options]
Fetch the newest version of Homebrew and all formulae from GitHub using git(1)
and perform any necessary migrations.
--merge Use git merge to apply updates (rather than
git rebase).
--auto-update Run on auto-updates (e.g. before brew
install). Skips some slower steps.
-f, --force Always do a slower, full update check (even
if unnecessary).
-q, --quiet Make some output more quiet
-v, --verbose Print the directories checked and git
operations performed.
-d, --debug Display a trace of all shell commands as they
are executed.
-h, --help Show this message.