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

Consolidate versions from both download sites #73

Merged

Conversation

interstateone
Copy link
Contributor

@interstateone interstateone commented Sep 19, 2019

Starting with Xcode 11 beta 6, developer.apple.com/download and developer.apple.com/download/more both list (some) pre-release versions of Xcode. Previously, pre-release versions only appeared on developer.apple.com/download. /download/more doesn't include build numbers, so we trust that if the version number and prerelease identifiers are the same as one on /download then they're the same build. If an Xcode version is listed on both sites then we prefer the one on /download because the build metadata is used later to compare against installed Xcodes.

Because pre-release versions that are installed also have build metadata, but this won't be the case for pre-release versions listed on /download/more, we also need to replace versions that are available with the installed ones with build metadata before printing them.

Resolves #67

Testing

Before:

❯ swift run xcodes update | tail -n15
[13/13] Linking ./.build/x86_64-apple-macosx/debug/xcodes
10.2
10.2.1 (Installed)
10.3
11.0 Beta (11M336w) (Installed)
11.0 Beta 2 (11M337n) (Installed)
11.0 Beta 3 (11M362v) (Installed)
11.0 Beta 4 (11M374r) (Installed)
11.0 Beta 5 (11M382q) (Installed)
11.0 Beta 6 (11M392q) (Installed)
11.0 Beta 7 (11M392r) (Installed)
11.0 GM Seed 1 (11A419c) (Installed)
11.0 GM Seed 2 (11A420a) (Installed)
11.0 # <---
11.0 # <--- These are Xcode 11 pre-release versions on /download/more
11.0 # <--- 

After:

❯ swift run xcodes update | tail -n15
[3/3] Linking ./.build/x86_64-apple-macosx/debug/xcodes
9.4.1
10.0
10.1 (Installed)
10.2
10.2.1 (Installed)
10.3
11.0 Beta (11M336w) (Installed)
11.0 Beta 2 (11M337n) (Installed)
11.0 Beta 3 (11M362v) (Installed)
11.0 Beta 4 (11M374r) (Installed)
11.0 Beta 5 (11M382q) (Installed)
11.0 Beta 6 (11M392q) (Installed)
11.0 Beta 7 (11M392r) (Installed)
11.0 GM Seed 1 (11A419c) (Installed)
11.0 GM Seed 2 (11A420a) (Installed)
# Note that the versions listed on /downloads/more are no longer listed twice

Starting with Xcode 11 beta 6, developer.apple.com/download and developer.apple.com/download/more both list some pre-release versions of Xcode.
Previously pre-release versions only appeared on developer.apple.com/download.
/download/more doesn't include build numbers, so we trust that if the version number and prerelease identifiers are the same that they're the same build.
If an Xcode version is listed on both sites then prefer the one on /download because the build metadata is used to compare against installed Xcodes.

Because pre-release versions that are installed also have build metadata, but this won't be the case for pre-release versions listed on /download/more, we also need to replace versions that are available with the installed ones with build metadata before printing them.
@MattKiazyk MattKiazyk self-requested a review September 20, 2019 19:31
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.

From:

9.4.1 (Installed)
10.0
10.1 (Installed)
10.2 (Installed)
10.2.1
10.3
11.0 Gm (11A420a)
11.0

to:

9.4.1 (Installed)
10.0
10.1 (Installed)
10.2 (Installed)
10.2.1
10.3
11.0 Beta 5 (11M382q) (Installed)
11.0 GM Seed 2 (11A420a)

@interstateone interstateone merged commit 5f690cd into XcodesOrg:master Sep 20, 2019
@interstateone interstateone deleted the 67-consolidate-versions branch September 20, 2019 19:45
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 this pull request may close these issues.

Xcode 11 betas are listed twice because they're included on the beta and release download sites
2 participants