diff options
Diffstat (limited to 'cmd/mbf/main.go')
| -rw-r--r-- | cmd/mbf/main.go | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 22bfbc3e..014a7f47 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -43,6 +43,7 @@ import ( "hakurei.app/message" "hakurei.app/pkg" + "hakurei.app/cmd/mbf/internal/ci" "hakurei.app/cmd/mbf/internal/pkgsite" "hakurei.app/cmd/mbf/internal/pkgsite/ui" ) @@ -504,7 +505,7 @@ func main() { c.NewCommand( "daemon", "Service artifact IR with Rosa OS extensions", - func(args []string) error { + func([]string) error { ul, err := net.ListenUnix("unix", &addr) if err != nil { return err @@ -514,6 +515,40 @@ func main() { }, ) + _ci := c.New("ci", command.UsageInternal) + _ci.NewCommand( + "daemon", + "Service CI workload dispatched through the socket", + func([]string) error { + return cm.Do(func(cache *pkg.Cache) error { + return ci.Serve(ctx, msg, cache) + }) + }, + ) + { + var flagOutput string + _ci.NewCommand( + "dist", + "Request distribution tarball for the specified source directory", + func(args []string) error { + if len(args) != 2 { + return errors.New("dist requires 2 arguments") + } + + return ci.Path(cm.base).MakeDist( + ctx, + os.Stdout, + flagOutput, + args[0], args[1], + ) + }, + ).Flag( + &flagOutput, + "o", command.StringFlag("."), + "Write the resulting distribution to the named directory", + ) + } + c.NewCommand( "keygen", "Create keypair for local cache", |
