Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add ability to print the Xcode path of a given version #219

Closed
rogerluan opened this issue Sep 21, 2022 · 0 comments · Fixed by #220
Closed

Feature Request: Add ability to print the Xcode path of a given version #219

rogerluan opened this issue Sep 21, 2022 · 0 comments · Fixed by #220

Comments

@rogerluan
Copy link
Contributor

rogerluan commented Sep 21, 2022

Hey 👋

In order to support fastlane's xcversion behavior of selecting a specific Xcode version just during the lifecycle of the current fastlane lane, we could use some tooling that enabled xcodes to print the Xcode path for a given version.

The related code in fastlane can be found here: https://github.com/fastlane/fastlane/blob/272063487b02b52510bb83172827fcbc336f4a55/fastlane/lib/fastlane/actions/xcversion.rb#L9 - as you can see, xcode-install (aka xcversion) has a function that returns an instance of "xcode" and sets its path as being the current DEVELOPER_DIR to be used by fastlane. If we had something similar in xcodes, then users wouldn't have to enter the sudo password at all when temporarily selecting the Xcode version just for the current build.

We could, alternatively, parse the response printed by xcodes installed as a raw string, regex it using something like:

xcode_paths_regex = /\s([\w\/\-\.\s]+)$/

But that wouldn't be reliable/scalable. I'd be concerned that any type of change in the way we log this could potentially break the regex and thus these 3rd party integrations (namely: fastlane).

I'll open a PR with a proposal 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant