Repository navigation
Announce a new major version apart from regular updates - #241
Merged
Merged
Conversation
The RELEASE channel now reads the GitHub release list instead of only the latest release. Drafts, prereleases and tags that aren't a version are skipped. The regular update notice uses the newest release on the running major version, so a 3.x server keeps being told about 3.x updates once 4.0.0 is out. If the newest release overall has a higher major version, the console and /usb version also show it with a link to its release notes, so admins read up on the migration before upgrading. Like the regular notice, it is shown on every check. Both can show at once. Failed checks behave as before, and it is still one request per check. STAGING is unchanged. UpdateChecker.getLatestVersion() keeps reporting the latest release on the running major version.
getLatestVersion() reads the staging feed as it is on the STAGING channel, so it can report a newer major version there. The docs now say so, and a test pins it. Another test checks that a snapshot of a new major version gets that version's release as a regular update.
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.
Once 4.0.0 is out, it becomes GitHub's latest release, and 3.x servers would be told to simply install it. 4.0 is a new major version with a migration, so the update check now tells the two apart.
/usb version: "There is a new major version of uSkyBlock available: 4.0.0" and "Read its release notes before upgrading: ". Both notices can show together./releases?per_page=100) instead of/releases/latest, and skips drafts, prereleases and tags that aren't versions.getLatestVersion()still means the newest release on the running major version (on STAGING, whatever the staging feed says, as documented now). The API stays binary compatible.Tests: 12 new in
SkyUpdateCheckerTestandPluginInfoTest, all without network. They cover choosing the release on the running major version when a newer major exists, both notices together, only the major notice, drafts and prereleases ignored, unparsable tags, a 4.0.0-SNAPSHOT build seeing 4.0.0 as a regular update, and the failure paths.Independent of the reload fix; the two change no file in common.