MCPcopy Create free account
hub / github.com/github/gh-aw / printCompileUpdateNotification

Function printCompileUpdateNotification

pkg/cli/compile_update_check.go:305–328  ·  view source on GitHub ↗
(notification *compileUpdateNotification)

Source from the content-addressed store, hash-verified

303}
304
305func 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}

Callers 2

StartCompileUpdateCheckFunction · 0.85

Calls 2

FormatWarningMessageFunction · 0.92
FormatInfoMessageFunction · 0.92

Tested by 1