Skip to content

Enhance Updater to properly support Pre-Releases - #69

Merged
JacksonTheMaster merged 2 commits into
nightlyfrom
fix-prerelease-updater
Aug 6, 2025
Merged

Enhance Updater to properly support Pre-Releases#69
JacksonTheMaster merged 2 commits into
nightlyfrom
fix-prerelease-updater

Conversation

@JacksonTheMaster

Copy link
Copy Markdown
Member

This PR fixes the updater to properly handle pre-release versions by querying the GitHub /releases endpoint instead of /releases/latest. The change ensures that users with AllowPrereleaseUpdates = true can detect and update to pre-releases, while those with AllowPrereleaseUpdates = false only get stable releases. It also improves logging to clearly inform users about pre-release availability and adds consistent countdowns for warnings.

Changes

Updated getLatestRelease:

  • Switched from /releases/latest to /releases to fetch all releases, including pre-releases.
  • Added logic to select the most recent version based on semantic versioning (Major.Minor.Patch)
  • Respects AllowPrereleaseUpdates: skips pre-releases if false, otherwise includes them.
  • Falls back to the latest stable release if a pre-release is found but AllowPrereleaseUpdates = false.
  • Logs warnings for invalid version tags and pre-releases when not allowed.
  • Added isReleaseNewerVersion:
  • New helper function to compare version numbers (Major, Minor, Patch).

Updated UpdateExecutable:

  • Improved logging to differentiate between querying "latest (pre)release" and "latest stable release" based on AllowPrereleaseUpdates.
  • Removed redundant pre-release check, as it's now handled in getLatestRelease.
  • Added countdown for "major-update" warning to match other warning styles.
  • Enhanced User Feedback:
  • Added countdowns for warnings (IsUpdateEnabled, major-update, pre-release skips) to improve UX.
  • Clearer log messages to inform users about pre-release availability and configuration options.

@JacksonTheMaster JacksonTheMaster left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

verified update functionality

@JacksonTheMaster
JacksonTheMaster merged commit bc134fa into nightly Aug 6, 2025
1 check passed
@JacksonTheMaster
JacksonTheMaster deleted the fix-prerelease-updater branch August 6, 2025 01:53
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.

1 participant