Update output of upgrade available notice

- Individual components are now colored
- We don't say "Release notes" anymore since the URL doesn't contain
  any release notes yet
This commit is contained in:
Mislav Marohnić 2019-12-04 15:14:48 +01:00
parent ba0a441e23
commit aaad263a3e

10
main.go
View file

@ -33,10 +33,14 @@ func main() {
newRelease := <-updateMessageChan
if newRelease != nil {
msg := fmt.Sprintf(`A new release of gh is available: %s %s
Release notes: %s`, currentVersion, newRelease.Version, newRelease.URL)
msg := fmt.Sprintf("%s %s → %s\n%s",
ansi.Color("A new release of gh is available:", "yellow"),
ansi.Color(currentVersion, "cyan"),
ansi.Color(newRelease.Version, "cyan"),
ansi.Color(newRelease.URL, "yellow"))
stderr := utils.NewColorable(os.Stderr)
fmt.Fprintf(stderr, "\n\n%s\n\n", ansi.Color(msg, "cyan"))
fmt.Fprintf(stderr, "\n\n%s\n\n", msg)
}
}