forked from x/icebergs
add some
This commit is contained in:
parent
ec2c270301
commit
c869e1fed7
@ -232,12 +232,12 @@ func init() {
|
||||
})
|
||||
}},
|
||||
cli.BUILD: {Name: "build name", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.CommandKey(), m.ActionKey()))
|
||||
m.Cmd("", FOR_FLOW, m.Option(mdb.NAME), kit.JoinWord(cli.SH, ice.ETC_MISS_SH))
|
||||
m.Sleep3s().Cmdy(ROUTE, cli.BUILD).ProcessInner()
|
||||
}},
|
||||
PUBLISH: {Name: "publish name", Help: "发布", Icon: "bi bi-send-check", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.CommandKey(), m.ActionKey()))
|
||||
defer ToastProcess(m)()
|
||||
list := []string{cli.LINUX, cli.DARWIN, cli.WINDOWS}
|
||||
msg := m.Spawn(ice.Maps{ice.MSG_DAEMON: ""})
|
||||
|
@ -108,6 +108,7 @@ func (s relay) Inputs(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s relay) Stats(m *ice.Message) {
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.CommandKey(), m.ActionKey()))
|
||||
cmds := []string{
|
||||
PACKAGE, `if yum -h &>/dev/null; then echo yum; elif apk version &>/dev/null; then echo apk; elif apt -h &>/dev/null; then echo apt; fi`,
|
||||
SHELL, `echo $SHELL`, KERNEL, `uname -s`, ARCH, `uname -m`,
|
||||
@ -293,7 +294,7 @@ func (s relay) Install(m *ice.Message, arg ...string) {
|
||||
s.Modify(m, kit.Simple(m.OptionSimple(MACHINE, web.DREAM))...)
|
||||
}
|
||||
func (s relay) Upgrade(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.CommandKey(), m.ActionKey()))
|
||||
if len(arg) == 0 && (m.Option(MACHINE) == "" || strings.Contains(m.Option(MACHINE), ",")) {
|
||||
s.foreach(m, func(msg *ice.Message, cmd []string) {
|
||||
ssh.PushShell(msg.Message, strings.Split(msg.Template(UPGRADE_SH), lex.NL), func(res string) {
|
||||
@ -305,7 +306,7 @@ func (s relay) Upgrade(m *ice.Message, arg ...string) {
|
||||
}
|
||||
}
|
||||
func (s relay) Version(m *ice.Message, arg ...string) {
|
||||
m.Option(ice.MSG_TITLE, m.ActionKey())
|
||||
m.Option(ice.MSG_TITLE, kit.Keys(m.CommandKey(), m.ActionKey()))
|
||||
s.foreach(m, func(msg *ice.Message, cmd []string) {
|
||||
ssh.PushShell(msg.Message, strings.Split(msg.Template(VERSION_SH), lex.NL), func(res string) {
|
||||
web.PushNoticeGrow(m.Options(ctx.DISPLAY, web.PLUGIN_XTERM).Message, res)
|
||||
|
Loading…
x
Reference in New Issue
Block a user