recompileWorkflow compiles a workflow using CompileWorkflows
(ctx context.Context, workflowPath string, verbose bool, approve bool)
| 133 | |
| 134 | // recompileWorkflow compiles a workflow using CompileWorkflows |
| 135 | func recompileWorkflow(ctx context.Context, workflowPath string, verbose bool, approve bool) error { |
| 136 | runPushLog.Printf("Recompiling workflow: %s", workflowPath) |
| 137 | |
| 138 | config := CompileConfig{ |
| 139 | MarkdownFiles: []string{workflowPath}, |
| 140 | Verbose: verbose, |
| 141 | EngineOverride: "", |
| 142 | Validate: true, |
| 143 | Watch: false, |
| 144 | WorkflowDir: "", |
| 145 | SkipInstructions: false, |
| 146 | NoEmit: false, |
| 147 | Purge: false, |
| 148 | TrialMode: false, |
| 149 | TrialLogicalRepoSlug: "", |
| 150 | Strict: false, |
| 151 | Approve: approve, |
| 152 | } |
| 153 | |
| 154 | runPushLog.Printf("Compilation config: Validate=%v, NoEmit=%v", config.Validate, config.NoEmit) |
| 155 | |
| 156 | runPushLog.Printf("Starting compilation with CompileWorkflows") |
| 157 | if _, err := CompileWorkflows(ctx, config); err != nil { |
| 158 | runPushLog.Printf("Compilation failed: %v", err) |
| 159 | return fmt.Errorf("compilation failed: %w", err) |
| 160 | } |
| 161 | |
| 162 | runPushLog.Printf("Successfully recompiled workflow: %s", workflowPath) |
| 163 | return nil |
| 164 | } |
| 165 | |
| 166 | // checkLockFileStatus checks if a lock file is missing or outdated and returns status info. |
| 167 | // Note: This is used for display/warning purposes only. The actual compilation decision |
no test coverage detected