forked from x/icebergs
opt ie
This commit is contained in:
parent
a458771a79
commit
a3b1a00378
@ -91,16 +91,14 @@ const (
|
||||
)
|
||||
const CLI = "cli"
|
||||
|
||||
var Index = &ice.Context{Name: CLI, Help: "命令模块",
|
||||
Commands: map[string]*ice.Command{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Load()
|
||||
_cli_init(m)
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Save()
|
||||
}},
|
||||
},
|
||||
}
|
||||
var Index = &ice.Context{Name: CLI, Help: "命令模块", Commands: map[string]*ice.Command{
|
||||
ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Load()
|
||||
_cli_init(m)
|
||||
}},
|
||||
ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
m.Save()
|
||||
}},
|
||||
}}
|
||||
|
||||
func init() { ice.Index.Register(Index, nil, RUNTIME, SYSTEM, DAEMON, QRCODE) }
|
||||
|
@ -82,7 +82,7 @@ const (
|
||||
DARWIN = "darwin"
|
||||
WINDOWS = "windows"
|
||||
AMD64 = "amd64"
|
||||
I386 = "i386"
|
||||
I386 = "386"
|
||||
ARM = "arm"
|
||||
|
||||
SOURCE = "source"
|
||||
|
@ -56,7 +56,7 @@ func init() {
|
||||
|
||||
// 执行编译
|
||||
_autogen_version(m.Spawn())
|
||||
m.Optionv(cli.CMD_ENV, kit.Simple(m.Confv(COMPILE, kit.Keym(cli.ENV)), cli.GOOS, goos, cli.GOARCH, arch))
|
||||
m.Optionv(cli.CMD_ENV, kit.Simple(m.Confv(COMPILE, kit.Keym(cli.ENV)), "GOOS", goos, "GOARCH", arch))
|
||||
if msg := m.Cmd(cli.SYSTEM, m.Confv(COMPILE, kit.Keym(GO)), "-o", file, main, ice.SRC_VERSION_GO, ice.SRC_BINPACK_GO); !cli.IsSuccess(msg) {
|
||||
m.Copy(msg)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user