A recent xpm, which is a portable Node.js command line application.
It is recommended to update to the latest version with:
npm install --global xpm@latest
The project is hosted on GitHub as:
To clone the stable branch (xpack
), run the following commands in a
terminal (on Windows use the Git Bash console):
rm -rf ~/Work/devices-cortexa-xpack.git && \
mkdir -p ~/Work && \
git clone \
https://github.com/micro-os-plus/devices-cortexa-xpack.git \
~/Work/devices-cortexa-xpack.git
For development purposes, clone the xpack-develop
branch:
rm -rf ~/Work/devices-cortexa-xpack.git && \
mkdir -p ~/Work && \
git clone \
--branch xpack-develop \
https://github.com/micro-os-plus/devices-cortexa-xpack.git \
~/Work/devices-cortexa-xpack.git
In this early development phase, package versions are not properly set, and if you have older versions of the xPack installed, sometimes updates may fail to get the latest version. To fix this remove all global packages by using
cd ~/Work/devices-cortexa-xpack.git
xpm run rm-global-deps
and repeat the steps from xpm install
.
With a clean slate, install dependencies:
cd ~/Work/devices-cortexa-xpack.git
xpm run install-all
The project includes unit tests.
To perform the tests, run the usual xpm sequence:
cd ~/Work/devices-cortexa-xpack.git
xpm run test-all
The above procedure will allow to develop the project itself, but the
dependencies will be read-only; to be able to contribute to them,
also clone the xpack-develop
branches of all µOS++ source xPacks
into a folder of your choice and link them to the central xPacks
folder by running xpack link
in each folder.
To automate this, there is a helper script to clone these repos into
${HOME}/Work/micro-os-plus-xpack-repos
:
curl -L https://raw.githubusercontent.com/micro-os-plus/helper-scripts/main/clone-and-link-all-git-repos.sh | bash -
Note: If you prefer a different location, start the script with a first argument as the destination folder path.
After cloning all Git repos, link this project to the development packages,
by running the link-deps
actions:
cd devices-cortexa-xpack.git
xpm run link-deps
The CI tests are performed on GitHub Actions, as the CI on Push workflow.
Code formatting is done using clang-format --style=file
, either manually
from a script, or automatically from Visual Studio Code, or the Eclipse
CppStyle plug-in.
- select the
xpack-develop
branch - commit all changes
- update versions in
README.md
andREADME-MAINTAINER.md
- update
CHANGELOG.md
- commit with a message like prepare v2.0.0
npm pack
and check the content of the archive, which should list onlypackage.json
,README.md
,LICENSE
,CHANGELOG.md
, the sources and CMake/meson files; possibly adjust.npmignore
npm version patch
,npm version minor
,npm version major
- push the
xpack-develop
branch to GitHub - the
postversion
npm script should also update tags viagit push origin --tags
- wait for the CI job to complete (https://github.com/micro-os-plus/devices-cortexa-xpack/actions/workflows/CI.yml)
npm publish --tag next
(usenpm publish --access public
when publishing for the first time)
The version is visible at:
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/devices-cortexa
npm dist-tag add @micro-os-plus/[email protected] latest
npm dist-tag ls @micro-os-plus/devices-cortexa
- in a separate browser windows, open TweetDeck
- using the
@micro_os_plus
account - paste the release name like µOS++ devices-cortexa v2.0.0 released
- paste the link to the Web page release
- click the Tweet button