Adding Command Line Tools Installer (for all versions)#378
Closed
BytesGuy wants to merge 8 commits intoxcpretty:masterfrom
BytesGuy:cli-tools
Closed
Adding Command Line Tools Installer (for all versions)#378BytesGuy wants to merge 8 commits intoxcpretty:masterfrom BytesGuy:cli-tools
BytesGuy wants to merge 8 commits intoxcpretty:masterfrom
BytesGuy:cli-tools
Conversation
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 #381 Solution proposed here: #381 (comment).
|
@BytesGuy are there any plans to follow-up on this PR? Is anyone reviewing this? |
Contributor
Author
|
@martinm82 No idea to be honest, haven’t seen any activity on this from the repo maintainers. The changes probably need some polishing up (I am very new to Ruby and contributing to OSS) but generally it works - we have had it in production since I wrote the modification and it’s been reliable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This supersedes #350 from @marcomorain as I used it as a base to work from on this idea.
The idea here is that while we can currently install the latest version of the CLI tools, this only installs the latest version via
softwareupdate- this will always be the latest stable version.Where we are installing beta versions of Xcode, we may wish to install the beta CLI tools that go along with them. This is especially true in the beta images we create at CircleCI.
Usage
xcversion toolswill list all version of CLI tools available to download and install:xcversion tools --install="Command Line Tools for Xcode x.x.x"will install the specified version (e.g.,xcversion tools --install="Command Line Tools for Xcode 11.2 beta 2")Implementation
This is piggybacking on the implementation for grabbing Xcode information and downloading it.
Listing the tools will ping the api and parse it, saving a copy of the response to the cache file.
The installation will use the info from the api to find and download the specified tools version. It will then proceed to install by mounting the dmg and installing the pkg. This has a simple check to compare the tools version number we have downloaded to that the version which is installed after the install is complete, just as an extra step of verification (this check will only work on macOS 10.9 and above for now due to the change in the way the CLI tools are packaged)
This will possibly need merging with the current
cli.rband I intend to look into that soon, but thought I would open this PR now to get any feedback!