showUpdateSummary displays a summary of workflow updates using console helpers
(successfulUpdates []string, failedUpdates []updateFailure)
| 9 | |
| 10 | // showUpdateSummary displays a summary of workflow updates using console helpers |
| 11 | func showUpdateSummary(successfulUpdates []string, failedUpdates []updateFailure) { |
| 12 | fmt.Fprintln(os.Stderr, "") |
| 13 | |
| 14 | // Show successful updates |
| 15 | if len(successfulUpdates) > 0 { |
| 16 | fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("Successfully updated and compiled %d workflow(s):", len(successfulUpdates)))) |
| 17 | for _, name := range successfulUpdates { |
| 18 | fmt.Fprintln(os.Stderr, console.FormatListItem(name)) |
| 19 | } |
| 20 | fmt.Fprintln(os.Stderr, "") |
| 21 | } |
| 22 | |
| 23 | // Show failed updates |
| 24 | if len(failedUpdates) > 0 { |
| 25 | fmt.Fprintln(os.Stderr, console.FormatErrorMessage(fmt.Sprintf("Failed to update %d workflow(s):", len(failedUpdates)))) |
| 26 | for _, failure := range failedUpdates { |
| 27 | fmt.Fprintf(os.Stderr, " %s: %s\n", failure.Name, failure.Error) |
| 28 | } |
| 29 | fmt.Fprintln(os.Stderr, "") |
| 30 | } |
| 31 | } |