Open lazerwalker opened 5 years ago
I'd want this too.
Hm, wouldn't you maybe be able to do this via xcversion update
, xcversion list
, then taking the final value displayed as "latest"?
They are guaranteed to be always ordered by version, and not alphabetically or random?
The output appears to be ordered via semantic versioning but I personally can not guarantee, we'd need someone else to confirm. But here's what I found: https://github.com/xcpretty/xcode-install/blob/09d26e89bff606e56d36049d516ed87c48161b06/lib/xcode/install.rb#L306
It looks like the list is exactly as it comes from Apple: https://github.com/xcpretty/xcode-install/blob/09d26e89bff606e56d36049d516ed87c48161b06/lib/xcode/install.rb#L378
Hey y'all!
A common feature of toolchain management software similar to xcode-install is letting you say "give me the latest stable version of the tools, whatever version number that might be". Examples include
rvm install --latest
andnvm install node
, which fetch the latest stable versions of MRI Ruby and Node, respetively.One thing I use
xcode-install
for is in scripting automation for setting up new Macs. To do that, while also managing my Xcode installations through xcode-install, I need to runxcversion list
and manually select the latest non-beta version to install. Allowing forxcversion install latest
(orxcversion install stable
, etc) would be SUPER useful for this use case.I understand the implementation of this might be a bit annoying (either needing to make a separate authenticated call to Apple's servers, or caching that version number somewhere else in a way that doesn't require manual updating).
I'm willing to help implement this, but wanted to read the room before investing any time. Is there interest and willingness to merge? Are there any nasty complexities I'm missing?
I didn't see anything similar to this show up in a cursory search of the Issues history, my apologies if I've missed something.
Thanks so much!