Carry dependencies through pipeline commands

This commit is contained in:
2026-09-05 17:53:56 +00:00
parent c3307ab5fb
commit dd905c4daa
13 changed files with 153 additions and 89 deletions

View File

@@ -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 {