/
cli.js
29 lines (20 loc) 路 1.22 KB
/
cli.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { readJSON } from '../lib/util.js';
import Log from './log.js';
const pkg = readJSON('../package.json');
const log = new Log();
const helpText = `Release It! v${pkg.version}
Usage: release-it <increment> [options]
Use e.g. "release-it minor" directly as shorthand for "release-it --increment=minor".
-c --config Path to local configuration options [default: ".release-it.json"]
-d --dry-run Do not touch or write anything, but show the commands
-h --help Print this help
-i --increment Increment "major", "minor", "patch", or "pre*" version; or specify version [default: "patch"]
--ci No prompts, no user interaction; activated automatically in CI environments
--only-version Prompt only for version, no further interaction
-v --version Print release-it version number
--release-version Print version number to be released
-V --verbose Verbose output (user hooks output)
-VV Extra verbose output (also internal commands output)
For more details, please see https://github.com/release-it/release-it`;
export let version = () => log.log(`v${pkg.version}`);
export let help = () => log.log(helpText);