// Code generated by summer build. DO NOT EDIT. package main import ( "context" "io" "os" "git.golem15.com/golem15/summercms/modules/backpack" "git.golem15.com/golem15/summercms/modules/bonfire" "git.golem15.com/golem15/summercms/modules/cabana" "git.golem15.com/golem15/summercms/modules/compass" "git.golem15.com/golem15/summercms/modules/conga" "git.golem15.com/golem15/summercms/modules/diary" "git.golem15.com/golem15/summercms/modules/lagoon" "git.golem15.com/golem15/summercms/modules/pact" "git.golem15.com/golem15/summercms/modules/party" "git.golem15.com/golem15/summercms/modules/surf" ) func main() { os.Exit(run(os.Args[1:], os.Stdout)) } func run(args []string, out io.Writer) int { g := bonfire.PeekGlobals(args) diary.Bootstrap(os.Stderr, diary.FromGlobals(g)) cfg, err := compass.Open(compass.Options{Dir: "config", Env: g.Env}) if err != nil { return bonfire.Fail(os.Stderr, "hello", err, g) } if err := diary.Setup(cfg, diary.FromGlobals(g)); err != nil { return bonfire.Fail(os.Stderr, "hello", err, g) } app := backpack.New(cfg) plugins, err := party.Activate(app, PluginIDs) if err != nil { return bonfire.Fail(os.Stderr, "hello", err, g) } commands := lagoon.RuntimeCommands(app, plugins) commands = append(commands, conga.RuntimeCommands(app, plugins)...) commands = append(commands, surf.ServeCommand(app, plugins)) commands = append(commands, surf.RouteListCommand(app, plugins)) commands = append(commands, cabana.RuntimeCommands(app)...) for _, plugin := range plugins { if hasCommands, ok := plugin.(pact.HasCommands); ok { commands = append(commands, hasCommands.Commands()...) } } if err := app.Publish(bonfire.NewCatalog(commands)); err != nil { return bonfire.Fail(os.Stderr, "hello", err, g) } root, err := bonfire.NewRoot("hello", commands, out, bonfire.WithVersion(bonfire.BuildVersion()), bonfire.OnGlobals(diary.ApplyGlobals)) if err != nil { return bonfire.Fail(os.Stderr, "hello", err, g) } return bonfire.Execute(context.Background(), root, args) }