This file documents the procedure used to make releases.
Before making the release, perform some checks and tweaks.
npm outdated
&npm update
- or edit
package.json
andnpm install
- repeat until everything is up to date
Dependencies
- https://www.npmjs.com/package/shelljs
- https://www.npmjs.com/package/standard
- https://www.npmjs.com/package/xpm
- https://www.npmjs.com/package/cp-file
- https://www.npmjs.com/package/del
In this Git repo:
- in the
develop
branch - push everything
- if needed, merge the
master
branch
Use the semantic versioning semantics.
Edit package.json
to this version suffixed by -pre
.
Check GitHub issues and pull requests:
- update version in
README-MAINTAINER.md
- check the rest of the file and update if needed, to reflect the new features
- update version in
README.md
- check the latest commits
npm run git-log
- open the
CHANGELOG.md
file - check if all previous fixed issues are in
- commit with a message like prepare v1.4.2
- select the
xpack-develop
branch - commit everything
npm run fix
- commit all changes
npm run test-all
- check the latest commits
npm run git-log
npm run pack
; check the content of the archive, which should list only the following; possibly adjust.npmignore
CHANGELOG.md
LICENSE
README.md
assets/...
index.js
lib/template.js
package.json
=== Bundled Dependencies ===
npm version patch
,npm version minor
,npm version major
- push all changes to GitHub; this should trigger CI
- push tag
- wait for CI tests to complete
- check https://github.com/micro-os-plus/hello-world-qemu-template-xpack/actions/
npm publish --tag next
(use--access public
when publishing for the first time)
The version is visible at:
The first test is via xpm init
:
mkdir -p ~/tmp/test-hello
cd ~/tmp/test-hello
xpm init --template @micro-os-plus/hello-world-qemu-template@next --property target=cortex-m7f
xpm install
xpm run test-all
The project also includes unit tests, which create multiple projects, with combinations of properties.
To run them, use:
cd hello-world-qemu-template-xpack.git
npm install
xpm run test-all
All available tests are also performed on GitHub Actions, as the CI on Push workflow.
When the package is considered stable:
- with a Git client (VS Code is fine)
- merge
xpack-develop
intoxpack
- push to GitHub
- select
xpack-develop
When the release is considered stable, promote it as latest
:
npm dist-tag ls @micro-os-plus/hello-world-qemu-template
npm dist-tag add @micro-os-plus/[email protected] latest
npm dist-tag ls @micro-os-plus/hello-world-qemu-template