- Node.js - Minimum version:
16
yarn # install npm dependencies
yarn bs # bootstrap repository with lerna to link local dependencies
cd packages/sdk # go to the @saagie/sdk project
yarn link # to use saagie-sdk everywhere ;)yarn testRun the dev command at the root of the project
yarn devThen go to your technology folder and run:
yarn link @saagie/sdk
export SAAGIE_ENV=development
yarn devYou can use Verdaccio (a local npm registry) to test dry-run package publication.
yarn global add verdaccioverdaccioyarn verdaccio:publishGo to @saagie/sdk on Verdaccio to see your package published.
npx @saagie/sdk init -- --registry http://localhost:4873/yarn verdaccio:unpublishThe published version will be automagically calculated using the recently closed PR that are not released yet. Each PR should have one (and only one) of the following label:
patchminormajor
If a PR as the label release on it, then, the GitHub Actions CI will
automatically create a new release on NPM and GitHub.
- Suppose we are currently at version
0.3.0, and there are only 1 PR with thepatchlabel, then the released version will be0.3.1. - Suppose we are currently at version
0.3.0, and there are 2 PR one with thepatchlabel and the other one with theminorlabel, then the released version will be0.4.0.
npm uses cmd that doesn't support command substitution that we use to get
the git commit hash for the build. You need to tell npm to use powershell
for this to work. Learn more here
and here.
npm config set script-shell "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"