xcpretty / xcode-install

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

Fixes xcode version finder #382

Closed robertwijas closed 4 years ago

robertwijas commented 4 years ago

It was finding a beta version despite the release one being already available (11.4 beta instead of 11.4). Now it tries to match the name first and when nothing matches it falls back to matching version.

Resolves xcpretty/xcode-install#381

Solution proposed here: https://github.com/xcpretty/xcode-install/issues/381#issuecomment-603812739.

xavierLowmiller commented 4 years ago

This probably fixes this (closed) issue as well: https://github.com/xcpretty/xcode-install/issues/374

OdNairy commented 4 years ago

Any updates on this PR?

hiragram commented 4 years ago

Any update? 👀

Can't wait for release.

robertwijas commented 4 years ago

You guys probably know that - but just in case - you can use the following in your Gemfile until it gets released:

gem 'xcode-install' , git: 'https://github.com/robertwijas/xcode-install', branch: 'fix/find-xcode-version'
jpsim commented 4 years ago

I'll be merging this because it looks like the e2e tests are failing for unrelated reasons.

RuntimeError: Missing username, and running in non-interactive shell

@Kesin11 @milch looks like both of you were involved in adding these failing e2e tests in https://github.com/xcpretty/xcode-install/pull/365. Can you look into how to fix them or otherwise disable them?

Kesin11 commented 4 years ago

@jpsim I created issue about e2e tests. https://github.com/xcpretty/xcode-install/issues/383 It is a limitation of Github Action secret. So I want to remove that test until the GitHub team resolves it.

milch commented 4 years ago

Hey everyone, I just released 2.6.4 which includes this fix: https://rubygems.org/gems/xcode-install/versions/2.6.4

Let me know if there are any issues 👍🏼

Kesin11 commented 4 years ago

@jpsim I disabled E2E test at #385. Could you review it?

nysander commented 4 years ago

when this change will be marked as release so gem update catches it?

OdNairy commented 4 years ago

when this change will be marked as release so gem update catches it?

It's already available as the 2.6.4 version.

nysander commented 4 years ago

am I missing something?

image

OdNairy commented 4 years ago

Just try to update your gem. I have no idea why there is no linked Github Release.

nysander commented 4 years ago

I have updated. It catches v2.6.4 but problem exists as in #381

$ xcversion --version
2.6.4
$ xcversion list
...
11.3.1 (installed)
11.4 beta 3 (installed)
11.4 (installed)
11.4 beta 2 (installed)
11.4 beta (installed)
$ ls /Applications/Xcode
Xcode-11.3.1.app/ Xcode-11.4.app/   Xcode.app/

where Xcode-11.4.app is in fact beta 3 and Xcode.app is version from App Store

robertwijas commented 4 years ago

@nysander looks like this PR doesn't fix the update flow. I only tested it on a machine without 11.4 beta installed. Another PR #386 is ready though.

nysander commented 4 years ago

I have removed all 11.4 versions and tried to install only GM but it installs 11.4 b3 every time

robertwijas commented 4 years ago

@nysander :( try the branch from #386. Sorry, looks like my PR didn't fix it... but somehow it was enough for me to install proper version locally.

robertwijas commented 4 years ago

@nysander xcversion cleanup might also be worth trying

iosdevben commented 4 years ago

After upgrading to xcode-install 2.6.4 I was able to xcversion install 11.5 and not get 11.5 beta 2. Success.

The confusion for me was that I typed gem update xcversion, expecting to get the latest version of xcversion. Of course it did not update xcode-install.

FeodorFitsner commented 4 years ago

xcversion install 11.5 installed 11.5 only, but xcversion list still shows other 11.5 as installed:

$ xcversion list | grep '(installed)'
11.5 beta (installed)
11.5 GM Seed (installed)
11.5 (installed)
11.5 beta 2 (installed)