forked from x/icebergs
opt some
This commit is contained in:
parent
47c1696b73
commit
46f74c05b0
@ -100,9 +100,10 @@ const (
|
|||||||
const (
|
const (
|
||||||
GOARCH = "GOARCH"
|
GOARCH = "GOARCH"
|
||||||
AMD64 = "amd64"
|
AMD64 = "amd64"
|
||||||
X386 = "386"
|
X86 = "386"
|
||||||
ARM = "arm"
|
ARM = "arm"
|
||||||
ARM64 = "arm64"
|
ARM64 = "arm64"
|
||||||
|
MIPSLE = "mipsle"
|
||||||
|
|
||||||
GOOS = "GOOS"
|
GOOS = "GOOS"
|
||||||
LINUX = "linux"
|
LINUX = "linux"
|
||||||
|
@ -234,7 +234,7 @@ func _space_fork(m *ice.Message) {
|
|||||||
args := append([]string{mdb.TYPE, kind, mdb.NAME, name}, m.OptionSimple(SHARE, RIVER)...)
|
args := append([]string{mdb.TYPE, kind, mdb.NAME, name}, m.OptionSimple(SHARE, RIVER)...)
|
||||||
|
|
||||||
m.Go(func() {
|
m.Go(func() {
|
||||||
h := m.Rich(SPACE, nil, kit.Dict(SOCKET, s, mdb.TEXT, text, args))
|
h := m.Rich(SPACE, nil, kit.Dict(SOCKET, s, mdb.TEXT, kit.Select(text, m.Option(mdb.TEXT)), args))
|
||||||
m.Log_CREATE(SPACE, name, mdb.TYPE, kind)
|
m.Log_CREATE(SPACE, name, mdb.TYPE, kind)
|
||||||
|
|
||||||
switch kind {
|
switch kind {
|
||||||
|
@ -17,7 +17,7 @@ func _compile_target(m *ice.Message, arg ...string) (string, string, string, str
|
|||||||
main, file := ice.SRC_MAIN_GO, ""
|
main, file := ice.SRC_MAIN_GO, ""
|
||||||
for _, k := range arg {
|
for _, k := range arg {
|
||||||
switch k {
|
switch k {
|
||||||
case cli.X386, cli.AMD64, cli.ARM64, cli.ARM:
|
case cli.AMD64, cli.X86, cli.ARM, cli.ARM64, cli.MIPSLE:
|
||||||
arch = k
|
arch = k
|
||||||
case cli.WINDOWS, cli.DARWIN, cli.LINUX:
|
case cli.WINDOWS, cli.DARWIN, cli.LINUX:
|
||||||
goos = k
|
goos = k
|
||||||
@ -46,7 +46,7 @@ func init() {
|
|||||||
cli.ENV, kit.Dict("GOPROXY", "https://goproxy.cn,direct", "GOPRIVATE", "shylinux.com,github.com", "CGO_ENABLED", "0"),
|
cli.ENV, kit.Dict("GOPROXY", "https://goproxy.cn,direct", "GOPRIVATE", "shylinux.com,github.com", "CGO_ENABLED", "0"),
|
||||||
)},
|
)},
|
||||||
}, Commands: map[string]*ice.Command{
|
}, Commands: map[string]*ice.Command{
|
||||||
COMPILE: {Name: "compile arch=amd64,386,arm,arm64 os=linux,darwin,windows src=src/main.go@key run binpack relay install", Help: "编译", Action: map[string]*ice.Action{
|
COMPILE: {Name: "compile arch=amd64,386,arm,arm64,mipsle os=linux,darwin,windows src=src/main.go@key run binpack relay install", Help: "编译", Action: map[string]*ice.Action{
|
||||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmdy(nfs.DIR, ice.SRC, nfs.DIR_CLI_FIELDS, kit.Dict(nfs.DIR_REG, `.*\.go$`)).Sort(nfs.PATH)
|
m.Cmdy(nfs.DIR, ice.SRC, nfs.DIR_CLI_FIELDS, kit.Dict(nfs.DIR_REG, `.*\.go$`)).Sort(nfs.PATH)
|
||||||
}},
|
}},
|
||||||
|
@ -95,7 +95,8 @@ func (m *Message) RenderDownload(args ...Any) *Message {
|
|||||||
return m.Render(RENDER_DOWNLOAD, args...)
|
return m.Render(RENDER_DOWNLOAD, args...)
|
||||||
}
|
}
|
||||||
func (m *Message) RenderWebsite(pod string, dir string, arg ...string) *Message {
|
func (m *Message) RenderWebsite(pod string, dir string, arg ...string) *Message {
|
||||||
return m.RenderResult(m.Cmdx(m.Space(pod), WEBSITE, SHOW, dir, arg))
|
m.Echo(m.Cmdx(m.Space(pod), WEBSITE, SHOW, dir, arg))
|
||||||
|
return m.RenderResult()
|
||||||
}
|
}
|
||||||
func (m *Message) RenderIndex(serve, repos string, file ...string) *Message {
|
func (m *Message) RenderIndex(serve, repos string, file ...string) *Message {
|
||||||
return m.RenderDownload(path.Join(m.Conf(serve, kit.Keym(repos, "path")), kit.Select(m.Conf(serve, kit.Keym(repos, INDEX)), path.Join(file...))))
|
return m.RenderDownload(path.Join(m.Conf(serve, kit.Keym(repos, "path")), kit.Select(m.Conf(serve, kit.Keym(repos, INDEX)), path.Join(file...))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user