0.0.1-alpha.5 • Published 8 months ago

cross-release-cli v0.0.1-alpha.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Cross Release CLI

Usage

  1. install through package manager
# pnpm
pnpm i cross-release -g

otherwise you can use you favorite package manager instead

# npm
npm i cross-release -g
# yarn
yarn add cross-release --global
  1. add to your package.json
{
  "scripts": {
    "release": "cross-release"
  }
}
  1. run release script
pnpm run release

Command line

shortlongdescriptiondefault
-m--mainMain project language e.g. java / javascript / rustfalse
-r--recursiveRun the command for each project in the workspacefalse
-d--dryDry runfalse
-D--dir dirSet working directoryproject root
-c--commitCommit current changesfalse
-p--pushPush the project to remotefalse
-t--tagCreate a tag for current versionfalse
-e--exclude dirFolders to exclude from search["node_modules", ".git"]
-y--yesAnswer yes to all promptsfalse

Configuration

You can specify various runtime settings by using the "package.json" file. Here are some examples that cover all the parameters:

{
  "...": "...",
  "cross-release": {
    // show the help message
    "showHelp": false,
    // show the version about cross-release
    "showVersion": false,
    "version": "",
    "isAllYes": false,
    "isDry": false,
    "isRecursive": false,
    "shouldCommit": false,
    "shouldPush": false,
    "shouldTag": false,
    // default exclude folders are `["node_modules", ".git"]`, your config will be append within it
    "excludes": ["path/to/exclude"],
    "dir": "/path/to/run",
    "commit": {
      // Whether to invoke git pre-commit and commit-msg hook
      "shouldVerify": true,
      // Whether to stage all un-staged files or stage only changed files
      "shouldStageAll": false,
      // the symbol '%s' will be replace to the version number that you specified
      "template": "chore: release v%s"
    },
    "push": {
      "shouldFollowTags": false
    }
  }
}