Yargs command builder for configuring the `ng-dev release build` command.
(argv: Argv)
| 24 | |
| 25 | /** Yargs command builder for configuring the `ng-dev release build` command. */ |
| 26 | function builder(argv: Argv): Argv<Options> { |
| 27 | return argv |
| 28 | .option('releaseVersion', { |
| 29 | type: 'string', |
| 30 | default: '0.0.0', |
| 31 | coerce: (version: string) => new semver.SemVer(version), |
| 32 | }) |
| 33 | .option('from', { |
| 34 | type: 'string', |
| 35 | description: 'The git tag or ref to start the changelog entry from', |
| 36 | demandOption: true, |
| 37 | }) |
| 38 | .option('to', { |
| 39 | type: 'string', |
| 40 | description: 'The git tag or ref to end the changelog entry with', |
| 41 | default: 'HEAD', |
| 42 | }) |
| 43 | .option('type', { |
| 44 | type: 'string', |
| 45 | description: 'The type of release notes to create', |
| 46 | choices: ['github-release', 'changelog'] as const, |
| 47 | default: 'changelog' as const, |
| 48 | }) |
| 49 | .option('prependToChangelog', { |
| 50 | type: 'boolean', |
| 51 | default: false, |
| 52 | description: 'Whether to update the changelog with the newly created entry', |
| 53 | }); |
| 54 | } |
| 55 | |
| 56 | /** Yargs command handler for generating release notes. */ |
| 57 | async function handler({releaseVersion, from, to, prependToChangelog, type}: Arguments<Options>) { |
nothing calls this directly
no outgoing calls
no test coverage detected