1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-07-08 12:42:55 +08:00
parent ab94f662b8
commit bd4f17865d
2 changed files with 13 additions and 4 deletions

View File

@ -84,7 +84,14 @@ func init() {
ice.CONTEXTS: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, arg...) }},
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.SOURCE) }},
nfs.BINARY: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.BINARY) }},
"manual": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "manual") }},
"manual": {Hand: func(m *ice.Message, arg ...string) {
host := web.UserHost(m)
m.Cmdy("web.wiki.spark", "shell",
cli.LINUX, kit.Format(`curl -fSL -O %s/publish/ice.linux.amd64`, host),
cli.DARWIN, kit.Format(`curl -fSL -O %s/publish/ice.darwin.amd64`, host),
cli.WINDOWS, kit.Format(`curl -fSL -O %s/publish/ice.windows.amd64`, host),
)
}},
"wget": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "wget") }},
"curl": {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, "curl") }},
"version": {Hand: func(m *ice.Message, arg ...string) {

View File

@ -80,10 +80,12 @@ func Run(arg ...string) string {
kit.If(len(arg) == 0 && len(os.Args) > 1, func() { arg = kit.Simple(os.Args[1:], kit.Split(kit.Env(CTX_ARG))) })
if len(arg) == 0 {
if runtime.GOOS == "windows" {
arg = append(arg, SERVE, START, DEV, DEV)
arg = append(arg, SERVE, START)
} else {
arg = append(arg, FOREVER, START)
}
} else if arg[0] == FOREVER && runtime.GOOS == "windows" {
arg[0] = SERVE
}
Pulse.meta[MSG_DETAIL] = arg
kit.For(kit.Sort(os.Environ()), func(env string) {