fix: embed final editor version when packaging#75
Open
erseco wants to merge 1 commit into
Open
Conversation
…rning#30) The static editor build (build-static-bundle.ts) resolves its version from APP_VERSION/VERSION env vars and otherwise falls back to package.json (0.0.0-alpha). The Makefile build-editor target ran the build without passing any version, so packaged releases shipped the editor as v0.0.0-alpha. - Makefile: resolve APP_VERSION (APP_VERSION -> VERSION -> EXELEARNING_EDITOR_REF -> exact git tag) and pass it to build:static. - release.yml: build the editor from the matching editor tag (vX.Y.Z) instead of main, so releases embed the final editor version. - check-editor-releases.yml: pass APP_VERSION explicitly. Same root cause and fix as exelearning/wp-exelearning#30.
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.
Same root cause and fix as exelearning/wp-exelearning#30.
Problem
When packaging a release, the embedded eXeLearning editor reports
v0.0.0-alphainstead of the final editor version (e.g.v4.0.0). The bundleddist/static/data/bundle.jsonanddist/static/manifest.jsonshowv0.0.0-alpha.Root cause
exelearning/scripts/build-static-bundle.tsresolves the version only from--version=/VERSION/APP_VERSION, and otherwise falls back tov${packageJson.version}=0.0.0-alpha. It does not derive the version from the git tag.The
build-editortarget in theMakefileranbun run build:staticwithout passing any of those variables, so it always produced0.0.0-alpha. In addition,release.ymlbuilt the editor frommaininstead of the matching tag.Changes
Makefile(build-editor): resolvesAPP_VERSION(order:APP_VERSION→VERSION→EXELEARNING_EDITOR_REFenv/.env→ exact git tag of the editor checkout → empty for local dev) and passes it tobuild:static..github/workflows/release.yml: on thereleaseevent, builds the editor from the matching editor tag (vX.Y.Z) instead ofmain..github/workflows/check-editor-releases.yml: passesAPP_VERSIONexplicitly.Verification
Local build without variables (dev) still works with its alpha/nightly fallback.
Moodle Playground Preview
The changes in this pull request can be previewed and tested using a Moodle Playground instance.