Report update progress and log to Hammerhead while updating
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2943af9bbf
commit
17c222c946
4 files changed
+51
-6
No files matched your search
+5
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user