mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 10:27:31 +08:00
add some
This commit is contained in:
parent
da81284b37
commit
8a27ce7d66
@ -193,6 +193,7 @@ const (
|
|||||||
SHARE_LOCAL = "/share/local/"
|
SHARE_LOCAL = "/share/local/"
|
||||||
PATHNAME = "pathname"
|
PATHNAME = "pathname"
|
||||||
FILENAME = "filename"
|
FILENAME = "filename"
|
||||||
|
CONTEXTS = "contexts"
|
||||||
|
|
||||||
TYPE_ALL = "all"
|
TYPE_ALL = "all"
|
||||||
TYPE_BIN = "bin"
|
TYPE_BIN = "bin"
|
||||||
|
@ -462,7 +462,7 @@ func init() {
|
|||||||
m.Cmdy(arg[1:])
|
m.Cmdy(arg[1:])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if kit.IsIn(arg[0], "", ice.CONTEXTS, ice.Info.NodeName) {
|
if kit.IsIn(arg[0], "", ice.Info.NodeName) {
|
||||||
m.Cmdy(arg[1:])
|
m.Cmdy(arg[1:])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
18
conf.go
18
conf.go
@ -62,15 +62,15 @@ const (
|
|||||||
)
|
)
|
||||||
const ( // REPOS
|
const ( // REPOS
|
||||||
CONTEXTOS = "ContextOS"
|
CONTEXTOS = "ContextOS"
|
||||||
CONTEXTS = "contexts"
|
// CONTEXTS = "contexts"
|
||||||
INTSHELL = "intshell"
|
INTSHELL = "intshell"
|
||||||
LEARNING = "learning"
|
LEARNING = "learning"
|
||||||
VOLCANOS = "volcanos"
|
VOLCANOS = "volcanos"
|
||||||
TOOLKITS = "toolkits"
|
TOOLKITS = "toolkits"
|
||||||
ICEBERGS = "icebergs"
|
ICEBERGS = "icebergs"
|
||||||
RELEASE = "release"
|
RELEASE = "release"
|
||||||
MATRIX = "matrix"
|
MATRIX = "matrix"
|
||||||
ICONS = "icons"
|
ICONS = "icons"
|
||||||
|
|
||||||
INSTALL = "install"
|
INSTALL = "install"
|
||||||
REQUIRE = "require"
|
REQUIRE = "require"
|
||||||
|
@ -129,7 +129,7 @@ func init() {
|
|||||||
m.Logs(nfs.SAVE, nfs.TARGET, file, nfs.SOURCE, main)
|
m.Logs(nfs.SAVE, nfs.TARGET, file, nfs.SOURCE, main)
|
||||||
m.Cmdy(nfs.DIR, file, "time,path,size,hash,link")
|
m.Cmdy(nfs.DIR, file, "time,path,size,hash,link")
|
||||||
web.MessageInsertJSON(m, cli.SYSTEM, "", m.Spawn().Copy(m).FormatMeta(), ctx.ARGS, m.Append(mdb.HASH))
|
web.MessageInsertJSON(m, cli.SYSTEM, "", m.Spawn().Copy(m).FormatMeta(), ctx.ARGS, m.Append(mdb.HASH))
|
||||||
kit.If(!m.IsCliUA() && strings.Contains(file, ice.ICE), func() { m.Cmdy(PUBLISH, ice.CONTEXTS, ice.APP) })
|
kit.If(!m.IsCliUA() && strings.Contains(file, ice.ICE), func() { m.Cmdy(PUBLISH, nfs.CONTEXTS, ice.APP) })
|
||||||
web.Count(m, "", file)
|
web.Count(m, "", file)
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
@ -67,11 +67,12 @@ func _publish_contexts(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
if m.Option(ice.MSG_USERPOD) != "" {
|
if m.Option(ice.MSG_USERPOD) != "" {
|
||||||
env = append(env, cli.CTX_POD, m.Option(ice.MSG_USERPOD))
|
env = append(env, cli.CTX_POD, m.Option(ice.MSG_USERPOD))
|
||||||
} else if name := msg.Append(nfs.PATHNAME); !kit.IsIn(name, path.Base(m.Option(nfs.SOURCE)), ice.CONTEXTS) {
|
} else if name := msg.Append(nfs.PATHNAME); !kit.IsIn(name, path.Base(m.Option(nfs.SOURCE))) {
|
||||||
env = append(env, cli.CTX_NAME, name)
|
env = append(env, cli.CTX_NAME, name)
|
||||||
}
|
}
|
||||||
case cli.CURL, cli.WGET:
|
case cli.CURL, cli.WGET:
|
||||||
}
|
}
|
||||||
|
env = append(env, kit.Simple(m.Optionv(cli.CTX_ENV))...)
|
||||||
kit.If(len(env) > 0, func() { m.Options(cli.CTX_ENV, lex.SP+kit.JoinKV(mdb.EQ, lex.SP, env...)) })
|
kit.If(len(env) > 0, func() { m.Options(cli.CTX_ENV, lex.SP+kit.JoinKV(mdb.EQ, lex.SP, env...)) })
|
||||||
if template := strings.TrimSpace(nfs.Template(m, kit.Keys(k, SH))); m.Option(nfs.FORMAT) == "raw" {
|
if template := strings.TrimSpace(nfs.Template(m, kit.Keys(k, SH))); m.Option(nfs.FORMAT) == "raw" {
|
||||||
m.Echo(template)
|
m.Echo(template)
|
||||||
@ -93,9 +94,9 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
PUBLISH: {Name: "publish path auto create volcanos icebergs intshell", Help: "发布", Icon: "QuickTime Player.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
PUBLISH: {Name: "publish path auto create volcanos icebergs intshell", Help: "发布", Icon: "QuickTime Player.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
||||||
ice.VOLCANOS: {Help: "火山架", Hand: func(m *ice.Message, arg ...string) { _publish_list(m, kit.ExtReg(HTML, CSS, JS)) }},
|
ice.VOLCANOS: {Help: "火山架", Hand: func(m *ice.Message, arg ...string) { _publish_list(m, kit.ExtReg(HTML, CSS, JS)) }},
|
||||||
ice.ICEBERGS: {Help: "冰山架", Hand: func(m *ice.Message, arg ...string) { _publish_bin_list(m).Cmdy("", ice.CONTEXTS) }},
|
ice.ICEBERGS: {Help: "冰山架", Hand: func(m *ice.Message, arg ...string) { _publish_bin_list(m).Cmdy("", nfs.CONTEXTS) }},
|
||||||
ice.INTSHELL: {Help: "神农架", Hand: func(m *ice.Message, arg ...string) { _publish_list(m, kit.ExtReg(SH, VIM, CONF)) }},
|
ice.INTSHELL: {Help: "神农架", Hand: func(m *ice.Message, arg ...string) { _publish_list(m, kit.ExtReg(SH, VIM, CONF)) }},
|
||||||
ice.CONTEXTS: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, arg...) }},
|
nfs.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.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) }},
|
nfs.BINARY: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, nfs.BINARY) }},
|
||||||
cli.CURL: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, cli.CURL) }},
|
cli.CURL: {Hand: func(m *ice.Message, arg ...string) { _publish_contexts(m, cli.CURL) }},
|
||||||
@ -131,7 +132,7 @@ func init() {
|
|||||||
nfs.TRASH: {Hand: func(m *ice.Message, arg ...string) { nfs.Trash(m, path.Join(ice.USR_PUBLISH, m.Option(nfs.PATH))) }},
|
nfs.TRASH: {Hand: func(m *ice.Message, arg ...string) { nfs.Trash(m, path.Join(ice.USR_PUBLISH, m.Option(nfs.PATH))) }},
|
||||||
}, ctx.ConfAction(mdb.FIELD, nfs.PATH)), Hand: func(m *ice.Message, arg ...string) {
|
}, ctx.ConfAction(mdb.FIELD, nfs.PATH)), Hand: func(m *ice.Message, arg ...string) {
|
||||||
if m.Option(nfs.DIR_ROOT, ice.USR_PUBLISH); len(arg) == 0 {
|
if m.Option(nfs.DIR_ROOT, ice.USR_PUBLISH); len(arg) == 0 {
|
||||||
_publish_list(m).Cmdy("", ice.CONTEXTS, ice.APP)
|
_publish_list(m).Cmdy("", nfs.CONTEXTS, ice.APP)
|
||||||
} else {
|
} else {
|
||||||
m.Cmdy(nfs.DIR, arg[0], "time,path,size,hash,link,action", ice.OptionFields(mdb.DETAIL))
|
m.Cmdy(nfs.DIR, arg[0], "time,path,size,hash,link,action", ice.OptionFields(mdb.DETAIL))
|
||||||
web.PushImages(m, web.P(PUBLISH, arg[0]))
|
web.PushImages(m, web.P(PUBLISH, arg[0]))
|
||||||
|
@ -202,7 +202,7 @@ func init() {
|
|||||||
m.Push(nfs.SIZE, kit.Split(m.Cmdx(cli.SYSTEM, "du", "-sh", path.Join(ice.USR_LOCAL_REPOS, value[REPOS])))[0])
|
m.Push(nfs.SIZE, kit.Split(m.Cmdx(cli.SYSTEM, "du", "-sh", path.Join(ice.USR_LOCAL_REPOS, value[REPOS])))[0])
|
||||||
m.PushScript(kit.Format("git clone %s", _service_link(m, value[REPOS])))
|
m.PushScript(kit.Format("git clone %s", _service_link(m, value[REPOS])))
|
||||||
}).Sort(REPOS)
|
}).Sort(REPOS)
|
||||||
kit.If(!m.IsCliUA(), func() { m.Cmdy(web.CODE_PUBLISH, ice.CONTEXTS, ice.DEV) })
|
kit.If(!m.IsCliUA(), func() { m.Cmdy(web.CODE_PUBLISH, nfs.CONTEXTS, ice.DEV) })
|
||||||
kit.If(mdb.Config(m, aaa.AUTH) == aaa.PRIVATE, func() { m.StatusTimeCount(aaa.AUTH, aaa.PRIVATE) })
|
kit.If(mdb.Config(m, aaa.AUTH) == aaa.PRIVATE, func() { m.StatusTimeCount(aaa.AUTH, aaa.PRIVATE) })
|
||||||
m.PushAction("settoken", mdb.REMOVE).Action(mdb.CREATE, aaa.AUTH)
|
m.PushAction("settoken", mdb.REMOVE).Action(mdb.CREATE, aaa.AUTH)
|
||||||
} else if repos := _repos_open(m, arg[0]); len(arg) == 1 {
|
} else if repos := _repos_open(m, arg[0]); len(arg) == 1 {
|
||||||
|
@ -93,7 +93,7 @@ func init() {
|
|||||||
} else {
|
} else {
|
||||||
m.Action(PULL, PUSH, INSTEADOF, mdb.DEV_REQUEST, ctx.CONFIG, STASH)
|
m.Action(PULL, PUSH, INSTEADOF, mdb.DEV_REQUEST, ctx.CONFIG, STASH)
|
||||||
}
|
}
|
||||||
kit.If(!m.IsCliUA(), func() { m.Cmdy(code.PUBLISH, ice.CONTEXTS, ice.DEV) })
|
kit.If(!m.IsCliUA(), func() { m.Cmdy(code.PUBLISH, nfs.CONTEXTS, ice.DEV) })
|
||||||
ctx.Toolkit(m)
|
ctx.Toolkit(m)
|
||||||
} else {
|
} else {
|
||||||
_repos_cmd(m, arg[0], DIFF)
|
_repos_cmd(m, arg[0], DIFF)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user