Skip to content

Commit bb6ede8

Browse files
Separated help text from usage text
1 parent b7cb5be commit bb6ede8

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/cli/help.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { manifest } from "../manifest";
22

33
/**
4-
* The CLI help text
4+
* Text explaining how to use the CLI
55
*/
6-
export const helpText = `
6+
export const usageText = `
77
Usage: ${manifest.name} [release] [options] [files...]
88
9-
${manifest.description}
10-
119
release:
1210
The release version or type. Can be one of the following:
1311
- A semver version number (ex: 1.23.456)
@@ -72,3 +70,10 @@ Examples:
7270
and all markdown files in the "docs" directory. Commits the updated files to git,
7371
and tags the commit as "Version 4.27.9934".
7472
`;
73+
74+
/**
75+
* Text describing the program and how to use it
76+
*/
77+
export const helpText = `
78+
${manifest.name} - ${manifest.description}
79+
${usageText}`;

src/cli/parse-args.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as semver from "semver";
44
import { isReleaseType } from "../release-type";
55
import { VersionBumpOptions } from "../types/version-bump-options";
66
import { ExitCode } from "./exit-code";
7-
import { helpText } from "./help";
7+
import { usageText } from "./help";
88

99
/**
1010
* The parsed command-line arguments

0 commit comments

Comments
 (0)