diff --git a/apps/sparo-lib/src/cli/commands/checkout.ts b/apps/sparo-lib/src/cli/commands/checkout.ts index f1f78d6..4d50677 100644 --- a/apps/sparo-lib/src/cli/commands/checkout.ts +++ b/apps/sparo-lib/src/cli/commands/checkout.ts @@ -70,10 +70,23 @@ export class CheckoutCommand implements ICommand { description: 'Create a new branch and start it at ; if it already exists, reset it to ' }) - .array('profile') - .default('profile', []) - .array('add-profile') - .default('add-profile', []) + .option('profile', { + describe: + 'Checkout projects by specified profile(s). The profiles will be recorded and reused by other sparo commands. For example, running "sparo checkout " sparse checkout based on the reused profiles after running "git checkout"', + default: [], + type: 'array' + }) + .option('add-profile', { + describe: + 'Checkout projects with recorded profile(s) and the specified added profile(s). Adds the specified added profile(s) to sparo recorded profiles', + default: [], + type: 'array' + }) + .option('no-profile', { + hidden: false, + describe: 'Checkout projects without any profiles and clear all recorded profiles', + type: 'boolean' + }) .option('to', { type: 'array', default: [], diff --git a/build-tests/sparo-output-test/etc/checkout-help.txt b/build-tests/sparo-output-test/etc/checkout-help.txt index 333768b..ebefe8d 100644 --- a/build-tests/sparo-output-test/etc/checkout-help.txt +++ b/build-tests/sparo-output-test/etc/checkout-help.txt @@ -19,6 +19,16 @@ Options: -b Create a new branch and start it at [boolean] -B Create a new branch and start it at ; if it already exists, reset it to [boolean] + --profile Checkout projects by specified profile(s). The profiles + will be recorded and reused by other sparo commands. For + example, running "sparo checkout " sparse checkout + based on the reused profiles after running "git checkout" + [array] [default: []] + --add-profile Checkout projects with recorded profile(s) and the + specified added profile(s). Adds the specified added + profile(s) to sparo recorded profiles [array] [default: []] + --no-profile Checkout projects without any profiles and clear all + recorded profiles [boolean] --to Checkout projects up to (and including) project , can be used together with option --profile/--add-profile to form a union selection of the two options. The projects @@ -30,5 +40,3 @@ Options: union selection of the two options. The projects selectors here will never replace what have been checked out by profiles [array] [default: []] - --profile [array] [default: []] - --add-profile [array] [default: []]