Carry dependencies through pipeline commands
This commit is contained in:
@@ -9,10 +9,14 @@ import (
|
||||
// RegenerateArtifacts expands the convenience command into its canonical run
|
||||
// invocation. The run command remains the sole owner of parsing and execution.
|
||||
func RegenerateArtifacts(ctx context.Context, args []string, out io.Writer) error {
|
||||
return regenerateArtifactsWithPipelineExecutor(ctx, args, out, executePlan)
|
||||
return regenerateArtifactsWithDependencies(ctx, args, out, executePlan, commandDependencies{})
|
||||
}
|
||||
|
||||
func regenerateArtifactsWithPipelineExecutor(ctx context.Context, args []string, out io.Writer, executor pipelineExecutor) error {
|
||||
return regenerateArtifactsWithDependencies(ctx, args, out, executor, commandDependencies{})
|
||||
}
|
||||
|
||||
func regenerateArtifactsWithDependencies(ctx context.Context, args []string, out io.Writer, executor pipelineExecutor, deps commandDependencies) error {
|
||||
if containsHelpOption(args) {
|
||||
printRegenerateArtifactsHelp(out)
|
||||
return nil
|
||||
@@ -25,7 +29,7 @@ func regenerateArtifactsWithPipelineExecutor(ctx context.Context, args []string,
|
||||
}
|
||||
expanded = append(expanded, "--force", "--from", "extract", "--through", "analyze")
|
||||
expanded = append(expanded, args...)
|
||||
return runWithPipelineExecutor(ctx, expanded, out, executor)
|
||||
return runWithDependencies(ctx, expanded, out, executor, deps)
|
||||
}
|
||||
|
||||
func containsHelpOption(args []string) bool {
|
||||
|
||||
Reference in New Issue
Block a user