fix(release): strip semver prerelease suffix from framework CFBundleVersion - #582
Open
dcalhoun wants to merge 1 commit into
Open
fix(release): strip semver prerelease suffix from framework CFBundleVersion#582dcalhoun wants to merge 1 commit into
dcalhoun wants to merge 1 commit into
Conversation
…ersion CFBundleVersion accepts at most three period-separated non-negative integers, so a prerelease version like `0.19.0-alpha.0` is rejected by altool with error 90058. Prerelease identifiers are alphanumeric by spec, so no substitution satisfies both grammars — the suffix has to be dropped. Stamp CFBundleVersion with the `major.minor.patch` core while leaving CFBundleShortVersionString on the full version, which Apple accepts and which keeps the exact release visible in the shipped framework. Reusing a core version across an alpha and its final release is safe: artifacts are identified by git SHA and by CDN URL plus SwiftPM checksum, never by this key. Also assert Apple's grammar in verify_framework_plist. The gate only checked that the plist matched package.json, so an illegal-but-matching value passed here and failed three hops downstream in a consumer's TestFlight upload — exactly what the gate exists to prevent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/582")Built from 7226134 |
dcalhoun
marked this pull request as ready for review
August 9, 2026 21:18
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.
What?
CFBundleVersionin theGutenbergKitResourcesframeworkInfo.plistwas stamped with the rawpackage.jsonversion, so prerelease versions produced an invalid value.Why?
Alpha releases of GutenbergKit break WordPress-iOS's TestFlight upload.
altoolrejects the build:CFBundleVersionhas a stricter grammar thanCFBundleShortVersionString: at most three period-separated non-negative integers.make release VERSION_TYPE=prereleaseproduces-alpha.Nversions routinely, so every alpha reproduces this.The suffix cannot be reshaped to fit — SemVer prerelease identifiers are alphanumeric by spec, so
0.19.0.alpha.0is equally invalid. It has to be dropped.Failing build: https://buildkite.com/automattic/wordpress-ios/builds/33627
How?
BUNDLE_VERSIONby stripping the prerelease (-…) and build-metadata (+…) suffixes, and stamp that intoCFBundleVersion.CFBundleShortVersionStringkeeps the full version, which Apple accepts and which preserves the exact release in the shipped framework.verify_framework_plist. The gate previously only checked the plist matchedpackage.json, so an illegal-but-matching value passed here and failed three hops downstream — precisely what the gate exists to prevent.Reusing a core version across an alpha and its final release is safe: artifacts are identified by git SHA (
package_xcframework.sh) and resolved by CDN URL plus SwiftPM checksum (Package.swift), never by this key.Testing Instructions
versioninpackage.jsonto0.19.0-alpha.0(do not commit it — the artifact name is keyed onHEAD).make build-resources-xcframework.Expected output —
bundledrops the prerelease suffix,shortkeeps it:package.jsonto0.19.0, rebuild, and confirm a non-prerelease version stamps0.19.0for both keys.Accessibility Testing Instructions
N/A — no user-facing UI change.
🤖 Generated with Claude Code