fix(build): Use dot-notation version format for Sparkle comparator#115
Merged
Conversation
CFBundleVersion was set to a 7-char git SHA. Sparkle's SUStandardVersionComparator treats the leading hex digit numerically, so every installed beta appeared newer than every appcast entry — Sparkle has never offered an update across all 9 beta releases. A second bug: dash notation (0.7.0-beta.N) is truncated at the first dash by the comparator, making consecutive betas compare as equal. Fix: - Introduce SPARKLE_VERSION conversion in Makefile, CI workflow, and generate-appcast.sh: 0.7.0-beta.9 → 0.7.0.b9 (dot notation) - Both CFBundleVersion and CFBundleShortVersionString now use this format; git SHA is stored in custom key TermQBuildSHA (display only) - Settings → About reads TermQBuildSHA for the Build field - Add TermQBuildSHA placeholder to both Info.plist templates - Add 8 unit tests against the real SUStandardVersionComparator, including regression guards proving the old formats are broken - Translate two pre-existing /* NEEDS TRANSLATION */ strings across all 39 non-English localization files Note: existing installs have SHA in CFBundleVersion and will not auto-update. One manual install is required — Sparkle has never delivered an update successfully, so this is not a regression. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Sparkle has never successfully offered an update across all 9 beta releases due to two compounding bugs in how version strings were set.
8be83a1) intoCFBundleVersion. Sparkle'sSUStandardVersionComparatortreats the leading hex digit numerically, so every installed beta compared as newer than any appcast entry. No update was ever offered.SUStandardVersionComparatortruncates at the first-, so0.7.0-beta.8and0.7.0-beta.9both reduce to0.7.0and compare as equal. Even with a correct CFBundleVersion, consecutive betas would never update.Changes
SPARKLE_VERSIONconversion —0.7.0-beta.9→0.7.0.b9(dot notation). Applied consistently in all three places that write version strings.CFBundleVersionandCFBundleShortVersionStringnow use this format.TermQBuildSHA). Sparkle never reads custom keys. Settings → About Build field reads from this key.TermQBuildSHAplaceholder added to bothInfo.plist.templateandConfig/Info-Debug.plist.SUStandardVersionComparator— correctness tests for the new.bNscheme plus regression guards proving the old SHA and dash formats are broken./* NEEDS TRANSLATION */markers (settings.auto.check.updates,settings.debug.update.warning.title) translated across all 39 non-English language files.sparkle-updaterskill,release/references/beta.md, andCONTRIBUTING.mdupdated with the version format rules and pitfalls.Testing
make testpasses — all 570 tests green, 8 newVersionComparisonTestsall passmake checkpasses — 0 lint errors, 0 format errorsNotes
Existing installs have a git SHA in
CFBundleVersionand will not auto-update to this release. One manual install is required — after which Sparkle will correctly detect and offer all future updates.🤖 Generated with Claude Code