Skip to content

fix(build): Use dot-notation version format for Sparkle comparator#115

Merged
eyelock merged 2 commits into
mainfrom
fix/sparkle-version-comparison
Apr 12, 2026
Merged

fix(build): Use dot-notation version format for Sparkle comparator#115
eyelock merged 2 commits into
mainfrom
fix/sparkle-version-comparison

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Apr 12, 2026

Summary

Sparkle has never successfully offered an update across all 9 beta releases due to two compounding bugs in how version strings were set.

  • Bug 1 — SHA in CFBundleVersion: The build system wrote a 7-char git SHA (e.g. 8be83a1) into CFBundleVersion. Sparkle's SUStandardVersionComparator treats the leading hex digit numerically, so every installed beta compared as newer than any appcast entry. No update was ever offered.
  • Bug 2 — Dash truncation: SUStandardVersionComparator truncates at the first -, so 0.7.0-beta.8 and 0.7.0-beta.9 both reduce to 0.7.0 and compare as equal. Even with a correct CFBundleVersion, consecutive betas would never update.

Changes

  • Makefile / CI / appcast script: Introduce SPARKLE_VERSION conversion — 0.7.0-beta.90.7.0.b9 (dot notation). Applied consistently in all three places that write version strings. CFBundleVersion and CFBundleShortVersionString now use this format.
  • TermQBuildSHA: Git SHA moved to a custom plist key (TermQBuildSHA). Sparkle never reads custom keys. Settings → About Build field reads from this key.
  • Info.plist templates: TermQBuildSHA placeholder added to both Info.plist.template and Config/Info-Debug.plist.
  • Tests: 8 unit tests against the real SUStandardVersionComparator — correctness tests for the new .bN scheme plus regression guards proving the old SHA and dash formats are broken.
  • Localization: Two pre-existing /* NEEDS TRANSLATION */ markers (settings.auto.check.updates, settings.debug.update.warning.title) translated across all 39 non-English language files.
  • Docs/skills: sparkle-updater skill, release/references/beta.md, and CONTRIBUTING.md updated with the version format rules and pitfalls.

Testing

  • make test passes — all 570 tests green, 8 new VersionComparisonTests all pass
  • make check passes — 0 lint errors, 0 format errors
  • Localization validated — all 40 language files consistent
  • Logging audit — no privacy violations
  • Manual install required for existing beta users (Sparkle has never delivered an update; this is not a regression)

Notes

Existing installs have a git SHA in CFBundleVersion and 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

David Collie and others added 2 commits April 12, 2026 22:15
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>
@eyelock eyelock merged commit e6ad90d into main Apr 12, 2026
9 checks passed
@eyelock eyelock deleted the fix/sparkle-version-comparison branch April 12, 2026 21:42
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