buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.39k stars 89 forks source link

[FR] Upate formules #225

Open qcksilver opened 1 year ago

qcksilver commented 1 year ago

I'd love if there was an option to update outed formulas along with casks.

Right now if when enter brew cu -a -y it updates homebrew, tells me what formulas are out of date, and then updates casks.

What I was actually looking for when I found cu is the ability to just type one command that updates everything homebrew related, in the correct order. cu is a big improvement for updating casks vs vanilla homebrew, but imo it's just missing this one feature that would make it perfect.

So it would be great if there was a way to enable this behavior by default or to add it is an option. Maybe -bf short for brew formulas?

ondrejfuhrer commented 1 year ago

Hey @qcksilver ,

Isn't that something you can simply achieve by using brew upgrade or brew upgrade --greedy (for auto-update & non-versioned casks)?

qcksilver commented 1 year ago

Yup. But doesn't brew upgrade --greedy pretty much do the same things as brew cu -a -y? brew cu just prints more information and looks much better (great job btw, I love how cu looks).

I guess I was just surprised that cu didn't automatically upgrade formulas since it tells me about outdated formulas and auto updates homebrew.

I thought it would be cool if cu could just do it all lol, but idk if there is some technical reason it can't?

yurikoles commented 1 year ago

This repo is called homebrew-cask-upgrade, brew cu stands for cask upgrade. Messages about outdated formulas are printed automatically by upstream brew update command, which is being called under the hood.

muescha commented 1 year ago

i had the same feature request.

also because it also includes MAS updates ( with --include-mas)

i would like to also see the normal home bew formulas here - so i get an "take it all"

and with the options to update interactive or pinning versions i get additional features compared to brew upgrade

siberianlove commented 3 months ago

What I was actually looking for when I found cu is the ability to just type one command that updates everything homebrew related, in the correct order.

Personally i prefer to use this thing: brew update && brew upgrade --formulae && yes | brew cu --all --cleanup && brew cleanup --prune=all as an alias brew u to update everything brew related. It's also possible to add --include-mas option to this approach.

And as one more thing i configured this alias to output command before executing, so i always know what executed under hood:

echo "brew update && brew upgrade --formulae && yes | brew cu --all --cleanup && brew cleanup --prune=all" && brew update && brew upgrade --formulae && yes | brew cu --all --cleanup && brew cleanup --prune=all

and you can add it by executing brew alias u --edit and pasting upper text and saving it. From now you can do brew u.

I think quite often people come to this tool when they want to update everything homebrew related using just one command while also been able to pin casks, so how about to provide them some instructions in README.md about how to do this? I think i can make PR, let me know if it's acceptable.