(ctx context.Context, resolvedWorkflows []string, addOpts AddOptions)
| 225 | } |
| 226 | |
| 227 | func runDeployAddPass(ctx context.Context, resolvedWorkflows []string, addOpts AddOptions) error { |
| 228 | workflowsToAdd, skippedWorkflows, err := excludeExistingSourcedWorkflows(resolvedWorkflows, addOpts) |
| 229 | if err != nil { |
| 230 | return fmt.Errorf("failed to inspect existing workflows: %w", err) |
| 231 | } |
| 232 | if len(skippedWorkflows) > 0 { |
| 233 | deployLog.Printf("Skipping add for existing sourced workflows (already handled by update): %s", strings.Join(skippedWorkflows, ", ")) |
| 234 | } |
| 235 | if len(workflowsToAdd) == 0 { |
| 236 | deployLog.Print("No new workflows to add after update pass") |
| 237 | return nil |
| 238 | } |
| 239 | |
| 240 | if _, err := AddWorkflows(ctx, workflowsToAdd, addOpts); err != nil { |
| 241 | return fmt.Errorf("failed to add workflows: %w", err) |
| 242 | } |
| 243 | return nil |
| 244 | } |
| 245 | |
| 246 | func runDeployCompilePass(ctx context.Context, addOpts AddOptions) error { |
| 247 | compileConfig := CompileConfig{ |
no test coverage detected