2021-04-04 03:42:05 +00:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2021-05-23 14:23:35 +00:00
|
|
|
"github.com/qiniu/goc/v2/pkg/build"
|
2021-04-04 03:42:05 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var buildCmd = &cobra.Command{
|
|
|
|
Use: "build",
|
2021-05-23 14:23:35 +00:00
|
|
|
Run: buildAction,
|
2021-04-19 02:18:37 +00:00
|
|
|
|
|
|
|
DisableFlagParsing: true, // build 命令需要用原生 go 的方式处理 flags
|
2021-04-04 03:42:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(buildCmd)
|
|
|
|
}
|
2021-04-19 02:18:37 +00:00
|
|
|
|
2021-05-23 14:23:35 +00:00
|
|
|
func buildAction(cmd *cobra.Command, args []string) {
|
|
|
|
b := build.NewBuild(cmd, args)
|
|
|
|
b.Build()
|
2021-04-19 02:18:37 +00:00
|
|
|
}
|