yao/cmd/inspect.go
Max ac8cdaeda9 refactor(workflows): remove license root certificate injection from build process
- Eliminated the steps for injecting commercial license root certificates from GitHub Secrets in both Linux and macOS workflows, streamlining the build process.
- Updated the `inspect` command to load commercial license information directly, enhancing the application's licensing capabilities without relying on external secrets during the build.
2026-03-27 15:46:01 +08:00

31 lines
689 B
Go

package cmd
import (
"github.com/spf13/cobra"
"github.com/yaoapp/kun/maps"
"github.com/yaoapp/kun/utils"
"github.com/yaoapp/yao/commercial"
"github.com/yaoapp/yao/config"
"github.com/yaoapp/yao/engine"
"github.com/yaoapp/yao/share"
)
var inspectCmd = &cobra.Command{
Use: "inspect",
Short: L("Show app configure"),
Long: L("Show app configure"),
Run: func(cmd *cobra.Command, args []string) {
Boot()
commercial.Load(config.Conf.Root, "yao")
engine.InspectExtTools()
res := maps.Map{
"version": share.VERSION,
"config": config.Conf,
}
res["license"] = commercial.License
if share.Tools != nil {
res["tools"] = share.Tools
}
utils.Dump(res)
},
}