fix output of "mox checkupdate", and specify changes to be from newest to oldest

This commit is contained in:
Mechiel Lukkien
2023-02-17 20:14:26 +01:00
parent cafccefad1
commit 4e5030ff38
4 changed files with 14 additions and 7 deletions

10
main.go
View File

@ -1634,8 +1634,14 @@ printed.
if latest.After(current) {
changelog, err := updates.FetchChangelog(context.Background(), changelogURL, current, changelogPubKey)
xcheckf(err, "fetching changelog")
fmt.Printf("Changelog\n\n")
fmt.Println(changelog)
if len(changelog.Changes) == 0 {
log.Printf("no changes in changelog")
return
}
fmt.Println("Changelog")
for _, c := range changelog.Changes {
fmt.Println("\n" + strings.TrimSpace(c.Text))
}
}
}