Report update progress and log to Hammerhead while updating
CI / test (push) Successful in 4m52s
Release / release (push) Successful in 7m36s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-10-26 17:58:37 -06:00
1 parent 2943af9bbf
commit 17c222c946
4 files changed
+51 -6

No files matched your search

+5 -1
View File
@@ -55,7 +55,11 @@ func main() {
}
b, err := bamboo.New(bamboo.Config{Hammerhead: strings.TrimRight(*hh, "/"), Token: *token, DataDir: *data, Docker: *dockerOn,
Version: version, AutoUpdate: *autoUpdate,
UpdateNow: func(ctx context.Context) (string, error) { return selfupdate.CheckOnce(ctx, upd) }})
UpdateNow: func(ctx context.Context, progress func(string, int, string)) (string, error) {
c := upd
c.Progress = func(e selfupdate.Event) { progress(e.Stage, e.Pct, e.Line) }
return selfupdate.CheckOnce(ctx, c)
}})
if err != nil {
log.Fatal(err)
}