xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.58k stars 237 forks source link

Fix installed list can distinguish beta version #386

Closed Kesin11 closed 4 years ago

Kesin11 commented 4 years ago

fix #384

Problem

xcversoin list shows "InstalledXcode" list that has only version info and can not distinguish which are beta or not. So if install the official version of Xcode 11.4, xcversion list shows also beta version of 11.4 is installed.

Solution

Add a new version identifier to "InstalledXcode" that will be made from the name of the installed Xcode app. If Xcode 11.4 beta 3 installed by xcversion install, installed app name will be Xcode-11.4.beta.3.app. It is possible to determine if it is beta version or not.

Of course it won't correctly determine if the installed Xcode app is renamed, but I couldn't think of a better idea.

milch commented 4 years ago

Of course it won't correctly determine if the installed Xcode app is renamed, but I couldn't think of a better idea.

I think it's fine as is, but we could run xcodebuild -version to get the full version and build numbers:

$ DEVELOPER_DIR=/Applications/Xcode-11.2.1.app/ xcrun xcodebuild -version
Xcode 11.2.1
Build version 11B500

Otherwise LGTM, thanks for the contribution!

jazaval commented 4 years ago

Hi @milch - it looks like these changes haven't been released to RubyGems (2.6.4 was released April 2nd). Can you release these changes when you get a chance? Thanks!