| 303 | } |
| 304 | |
| 305 | func printCompileUpdateNotification(notification *compileUpdateNotification) { |
| 306 | if notification == nil { |
| 307 | return |
| 308 | } |
| 309 | |
| 310 | fmt.Fprintln(os.Stderr) |
| 311 | |
| 312 | switch notification.Kind { |
| 313 | case compileUpdateNotificationRemovedTag: |
| 314 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf( |
| 315 | "The installed gh-aw compiler version %s is no longer available as a repository tag.", notification.CurrentVersion, |
| 316 | ))) |
| 317 | fmt.Fprintln(os.Stderr, console.FormatWarningMessage(fmt.Sprintf( |
| 318 | "Update the compiler before recompiling workflows (latest release: %s).", notification.LatestVersion, |
| 319 | ))) |
| 320 | default: |
| 321 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf( |
| 322 | "Compiler upgrade recommended: gh-aw %s is behind the latest release %s.", notification.CurrentVersion, notification.LatestVersion, |
| 323 | ))) |
| 324 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Hint: upgrade the compiler with: gh extension upgrade github/gh-aw")) |
| 325 | } |
| 326 | |
| 327 | fmt.Fprintln(os.Stderr) |
| 328 | } |