refactor: integrate CLI's code & CI into main repo (#1343)

This commit is contained in:
dkeven
2025-05-26 17:21:25 +08:00
committed by GitHub
parent 532b0a3e24
commit 22fdd7b86f
529 changed files with 102147 additions and 66 deletions

24
cli/cmd/ctl/os/storage.go Normal file
View File

@@ -0,0 +1,24 @@
package os
import (
"bytetrade.io/web3os/installer/cmd/ctl/options"
"bytetrade.io/web3os/installer/pkg/pipelines"
"github.com/spf13/cobra"
"log"
)
func NewCmdInstallStorage() *cobra.Command {
o := options.NewInstallStorageOptions()
cmd := &cobra.Command{
Use: "storage",
Short: "install a storage backend for the Olares shared filesystem, or in the case of external storage, validate the config",
Run: func(cmd *cobra.Command, args []string) {
if err := pipelines.CliInstallStoragePipeline(o); err != nil {
log.Fatalf("error: %v", err)
}
},
}
o.AddFlags(cmd)
return cmd
}