The theme uses updateVersion.js to keep version consistent across style.css, package.json, composer.json, and README.md.
Recommended: Set version in .env, then run:
echo "VERSION=1.4.0" > .env
npm run version-updateOther options: VERSION=1.4.0 npm run version-update or npx dotenv -e .env -- npm run version-update.
style.css(theme header)package.jsoncomposer.jsonREADME.md(version line)
- Patch (e.g. 1.4.0 → 1.4.1): Create
patch/1.4.1(orhotfix/1.4.1), make fixes, setVERSION=1.4.1in.env, runnpm run version-update, commit, push, open PR, then tag after merge. - Minor (e.g. 1.4.0 → 1.5.0): Create
feature/1.5.0, add features, update version, update CHANGELOG if used, commit, push, PR, tag. - Major (e.g. 1.4.0 → 2.0.0): Create
release/2.0.0, implement breaking changes, update docs, runnpm run build,npm run lint,npm run a11y, then version bump and PR/tag.
echo "VERSION=1.4.0-beta.1" > .env
npm run version-update(Same for -alpha.1, -rc.1, etc.)
- Version not updating: Ensure
.envexists withVERSION(e.g.1.4.0, notv1.4.0). Runnpm run version-updateand check for errors. - Permission errors: Check write permissions and that files aren’t locked.
- Script not found: Ensure
updateVersion.jsexists and Node is installed; runnpm installif needed.