2.1.1 • Published 1 year ago
@onereach/get-version-data v2.1.1
@onereach/get-version-data
CLI tool to get version data for deploy
Installation
With npm
npm i -D @onereach/get-version-data
With pnpm
pnpm add -D @onereach/get-version-data
How to use
Run command
or-get-version-data .
Which will return JSON with service version data like this (beatified for README)
{
"service": "@onereach/flow-builder",
"version": "2.31.6",
"deploymentTime": "2022-06-15T14:59:32.798Z",
"feature": "master",
"git": {
"branch": "master",
"bundleTags": [],
"commitHash": "8531cf8aef3180c48fb7d0779a3dc231d4af95f8",
"isDirty": false
},
"packages": {
"@onereach/auth-ui-module": "1.5.0",
"@onereach/ckeditor5-build-full": "1.1.10",
"@onereach/external-steps-sdk": "0.2.2",
"@onereach/or-i18n": "0.0.3",
"@onereach/sdk": "2.0.276",
"@onereach/service-navigation": "1.1.3",
"@onereach/time-interpreter": "1.0.18",
"@onereach/ui": "2.0.218",
"@onereach/ui-config": "1.0.8",
"@onereach/ws-client": "1.1.8"
}
}
You can use it inside shell scripts like this for example:
#! /usr/bin/env bash
set -e # exit on error
set -o pipefail # exit on error
...
VERSION_DATA=$(node_modules/.bin/or-get-version-data)
echo $VERSION_DATA
...
How to contribute?
When you start working on something that should be added into changelog run:
pnpm changeset add
Choose what type of change is it: patch
, minor
or major
and add summary (will end up being actual line in the changelog)
How to publish package?
Everything is automated, all you need is run:
pnpm run or-publish
Version of the package will be set based on changeset files. Then package will be published and tags will be pushed to git