mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 18:37:29 +08:00
add git.push
This commit is contained in:
parent
d46702a241
commit
4d18eb1ed2
@ -301,6 +301,10 @@ var Index = &ice.Context{Name: GIT, Help: "代码库",
|
|||||||
m.Option(cli.CMD_DIR, path.Join("usr", m.Option("name")))
|
m.Option(cli.CMD_DIR, path.Join("usr", m.Option("name")))
|
||||||
m.Cmdy(cli.SYSTEM, "git", "commit", "-am", kit.Select("opt some", strings.Join(arg, " ")))
|
m.Cmdy(cli.SYSTEM, "git", "commit", "-am", kit.Select("opt some", strings.Join(arg, " ")))
|
||||||
}},
|
}},
|
||||||
|
"push": {Name: "push", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.Option(cli.CMD_DIR, path.Join("usr", m.Option("name")))
|
||||||
|
m.Cmdy(cli.SYSTEM, "git", "push")
|
||||||
|
}},
|
||||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
m.Richs(REPOS, nil, kit.Select(kit.MDB_FOREACH, arg, 0), func(key string, value map[string]interface{}) {
|
m.Richs(REPOS, nil, kit.Select(kit.MDB_FOREACH, arg, 0), func(key string, value map[string]interface{}) {
|
||||||
if m.Option(cli.CMD_DIR, kit.Value(value, "meta.path")); len(arg) > 0 {
|
if m.Option(cli.CMD_DIR, kit.Value(value, "meta.path")); len(arg) > 0 {
|
||||||
@ -317,7 +321,7 @@ var Index = &ice.Context{Name: GIT, Help: "代码库",
|
|||||||
m.Push("file", vs[1])
|
m.Push("file", vs[1])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
m.PushAction("提交")
|
m.PushAction("提交", "上传")
|
||||||
}},
|
}},
|
||||||
|
|
||||||
"_install": {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
"_install": {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user