Add support for and default to Xcode Releases data source #129
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.
This adds support for Xcode Releases as a data source for available Xcode versions, and makes it the default. It's still possible to use the Apple data source by providing the
--data-source=apple
option. The motivation for this is that while the data is unofficial it is more complete and reliable than scraping the Apple Developer website. This code is all taken from (with some small changes) Xcodes.app.Two other changes come along with this:
Testing
swift run xcodes update
first to make sure you have Xcode Releases data, and then use other commands and make sure they still work the way you expect.You can do the same after running
swift run xcodes update --data-source=apple
to make sure the Apple one still works, except for the issue noted in #123.I'm going to say that this fixes #123 for now. We could invest more time into making the Apple data source work perfectly but part of the motivation for adding Xcode Releases support is to not have to do that. If another contributor wishes to do so we'd welcome that change.