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

Add "version" argument to "installed" function, printing Xcode's installation path #220

Merged
merged 1 commit into from Sep 29, 2022

Conversation

rogerluan
Copy link
Contributor

@rogerluan rogerluan commented Sep 21, 2022

Description

Resolves #219

This is another initiative that powers xcpretty/xcode-install#467

With the resolution of #219, we can have a smoother transition from xcode-install to xcodes, including on fastlane integrations.

See also: fastlane/fastlane#20672

Manual Tests Run

image

Copy link
Contributor

@MattKiazyk MattKiazyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks awesome - Thanks @rogerluan

@MattKiazyk MattKiazyk added the enhancement New feature or request label Sep 29, 2022
@MattKiazyk MattKiazyk merged commit 7176628 into XcodesOrg:main Sep 29, 2022
@rogerluan rogerluan deleted the roger/print-version-path branch September 29, 2022 09:37
revolter pushed a commit to fastlane/fastlane that referenced this pull request Nov 2, 2022
joshdholtz pushed a commit to fastlane/fastlane that referenced this pull request Nov 12, 2022
…all` (#20672)

* Move helpers to a separate and centralized file.

* Deprecate 'xcode-install' gem (the project has been sunset), adding 'xcodes' action to replace the 'xcode_install' one.

* Add 'select_only' option to 'xcodes', deprecating 'xcversion' action.

* Update documentation to state it also supports .xcode-version file.

* Add TODO for a future improvement.

* Lint.

* Fix link.

* Remove TODO comment.

* Lint.

* Fix typo in error being raised.

* Add ability to select Xcode just for current build, without sudo permissions.
- Depends on XcodesOrg/xcodes#220

* Update documentation to point to 'xcodes' instead.

* Update xcodes link.

* Apply suggestions from code review.

Co-authored-by: Iulian Onofrei <5748627+revolter@users.noreply.github.com>

* Change "#" by "." in spec descriptions, to indicate class methods.

* Apply suggestion from code review.

* Improve documentation around requirements to run xcodes.

* Remove necessity to authenticate with Apple servers since xcodes v1.0.0.

* Use new --update and --selected arguments, which require xcodes v1.1.0.

* Fix comparing Gem::Version with String error

* Remove unused local variable

* Split long lines

* Fix lint issues

* Address style comments.

* Remove superfluous trailing slash

This makes it consistent with the rest of the codebase.

* Fix unsafe paths concatenation

* Fix some WWDR certificates test failure

This was caused by the fact that that test calls a method that uses `$?`
(https://stackoverflow.com/a/6834572/865175), which, somehow, (I think)
was executed right after a call to XcodesHelper's
`find_xcodes_binary_path` method. This latter one returned a non-zero
code, because `xcodes` can't be installed on Ubuntu, which got picked up
by the certificates return code check, so it treated its actual command
as failed.

* Replace `Actions.sh` call with a native one

(reverted from commit 11bd750)

* Fix error-prone shell command status check

In the case of the tests, `$?` was not mocked, so it looks like it was
indeed just a coincidence that it worked. Meaning, some other shell
command that somehow was actually executed (so it wasn't stubbed)
succeeded, which caused the `$?.success?` to succeed too.

Co-authored-by: Iulian Onofrei <5748627+revolter@users.noreply.github.com>
Co-authored-by: Iulian Onofrei <iulian.onofrei@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Add ability to print the Xcode path of a given version
2 participants