Report version and auto-update state to Hammerhead and update on request
CI / test (push) Successful in 8m7s
Release / release (push) Successful in 4m42s

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

No files matched your search

+5 -2
View File
@@ -49,10 +49,13 @@ func main() {
log.Printf("bamboo %s starting", version)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()
upd := selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/bamboo", App: "bamboo", Current: version, Logf: log.Printf}
if *autoUpdate {
go selfupdate.Run(ctx, selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/bamboo", App: "bamboo", Current: version, Logf: log.Printf})
go selfupdate.Run(ctx, upd)
}
b, err := bamboo.New(bamboo.Config{Hammerhead: strings.TrimRight(*hh, "/"), Token: *token, DataDir: *data, Docker: *dockerOn})
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) }})
if err != nil {
log.Fatal(err)
}