fix(playground): keep blueprint editor version in sync with .editor-version#52
Merged
Merged
Conversation
…ersion The playground downloaded editor v4.0.0 while .editor-version had moved to v4.0.1: check-editor-releases.yml only bumped the .editor-version marker and never the hardcoded editor URL in blueprint.json, so the preview stayed pinned. - Catch up blueprint.json to v4.0.1 (matches .editor-version). - Rewrite the blueprint's editor URL on every bump so the two stay in sync.
Contributor
Test in WordPress PlaygroundTest the plugin with the code from this branch:
|
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.
Problem
The playground booted with eXeLearning editor v4.0.0 even though the latest upstream release — and this repo's
.editor-version— is v4.0.1.Root cause: there are two sources of truth for the editor version, and only one was kept current.
.editor-version— bumped automatically every day bycheck-editor-releases.yml.blueprint.json— a hardcoded editor download URL that the workflow never touched.So
.editor-versionadvanced to v4.0.1 whileblueprint.jsonstayed pinned at v4.0.0, and the playground / PR-preview kept serving the old editor. Production plugin releases were unaffected (they bake the editor from.editor-version); only the playground demo drifted.Fix
blueprint.jsonto v4.0.1 so it matches.editor-version.check-editor-releases.ymlnow rewrites the blueprint's editor URL (viased) whenever it bumps.editor-version, and commits both files together, so they can never drift apart again.The
sedonly rewrites the editor asset reference (release=,releases/download/,exelearning-static-*.zip); the plugin source URL and content fixtures are left untouched. Verified against plain version tags and RC-suffixed tags (e.g.v4.0.0-rc3).Verification
blueprint.jsonnow resolves the same version as.editor-version(v4.0.1).sedrewrites only the editor URL on a simulated bump.blueprint.jsonis valid JSON and the workflow is valid YAML.