diff --git a/README.md b/README.md index 6fadf68..26ccbbc 100644 --- a/README.md +++ b/README.md @@ -377,10 +377,11 @@ Or provide an explicit path: luca run --file pipelines/release.yml ``` -Pass parameter values at runtime with `--param`: +Pass parameter values at runtime with `--param` (or its short form `-p`): ```bash luca run build --param configuration=release --param upload=true +luca run build -p configuration=release -p upload=true ``` Preview what would happen without executing anything: diff --git a/Sources/LucaCLI/Commands/RunCommand.swift b/Sources/LucaCLI/Commands/RunCommand.swift index 0f3b78d..103013d 100644 --- a/Sources/LucaCLI/Commands/RunCommand.swift +++ b/Sources/LucaCLI/Commands/RunCommand.swift @@ -44,13 +44,14 @@ struct RunCommand: AsyncParsableCommand { 4. ./pipelines/.params Use --params-file to specify an explicit params file path. - Values from --param override values from the params file. + Values from --param/-p override values from the params file. Examples: luca run ci luca run deploy --dry-run luca run --file pipelines/release.yml luca run ci --params-file ./ci.params.yml + luca run build -p flavor=release -p upload=true """ ) @@ -79,12 +80,12 @@ struct RunCommand: AsyncParsableCommand { )) var dryRun: Bool = false - @Option(name: .customLong("param"), help: ArgumentHelp( + @Option(name: [.customLong("param"), .customShort("p")], help: ArgumentHelp( "Set a pipeline parameter value.", discussion: """ Provide KEY=VALUE pairs to satisfy parameters declared in the pipeline's `parameters:` block. May be repeated for multiple parameters. - Example: --param flavor=release --param upload=true + Example: --param flavor=release -p upload=true """, valueName: "KEY=VALUE" ))