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:
parent
ba0a441e23
commit
aaad263a3e
1 changed files with 7 additions and 3 deletions
10
main.go
10
main.go
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue