Skip to content

Commit

Permalink
Implement general help description (#44)
Browse files Browse the repository at this point in the history
* added initial help description in const string

* fix grammar

* add summary to upload w manifest, added usage to main command

* fix lint

* update description

* fix typo
  • Loading branch information
tonzhan2 authored Nov 18, 2024
1 parent 8ae9c9d commit fbc1092
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/commands/android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ Optionally, you can also include a UUID to identify the upload session.

const androidUploadWithManifestDescription =
`
This command uploads the provided file using the packaged AndroidManifest.xml file provided.
The application ID, version code, and optional UUID will be extracted from the manifest.
This command uploads the provided file using the packaged AndroidManifest.xml provided.
You need to provide the path to the mapping file, and the path to the AndroidManifest.xml file.
The application ID, version code, and optional UUID will be extracted from the manifest file.
This command is recommended if you want to automate the upload process without manually specifying the application details.
`;

Expand All @@ -61,7 +62,7 @@ androidCommand
.showHelpAfterError(true)
.usage('--app-id <value> --version-code <int> --file <path> [--uuid <value>]')
.description(androidUploadDescription)
.summary(`Uploads the Android mapping.txt file of the given path with provided application ID, version code, and optional UUID`)
.summary(`Uploads the Android mapping.txt file with the provided application ID, version code, and optional UUID`)
.requiredOption('--app-id <value>', 'Application ID')
.requiredOption('--version-code <int>', 'Version code')
.requiredOption('--file <path>', 'Path to the mapping file')
Expand Down Expand Up @@ -108,6 +109,7 @@ androidCommand
.command('upload-with-manifest')
.showHelpAfterError(true)
.usage('--manifest <path> --file <path>')
.summary(`Uploads the Android mapping.txt file with metadata extracted from the AndroidManifest.xml file`)
.description(androidUploadWithManifestDescription)
.requiredOption('--manifest <path>', 'Path to the packaged AndroidManifest.xml file')
.requiredOption('--file <path>', 'Path to the mapping.txt file')
Expand Down
11 changes: 9 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ import { sourcefilesCommand } from './commands/sourcefiles';

const program = new Command();

const helpDescription =
`A CLI tool for uploading and displaying of Android, iOS, and Browser symbolication files to and from Splunk O11y Cloud.
For each respective command listed below, please run 'o11y-dem-cli <command>' for an overview of available subcommands and options
`;

program
.version('1.0.0')
.description('A CLI Tool to allow uploading of Android, iOS, and Browser symbolication files to Splunk O11y Cloud');

.description(helpDescription)
.usage('[ios|android|sourcemaps] [sub-command] [options]');

program.addCommand(iosCommand);
program.addCommand(androidCommand);
program.addCommand(sourcemapsCommand);
Expand Down

0 comments on commit fbc1092

Please sign in to comment.