From 4d18eb1ed2c5c6f1d1e78c65440b0dfc91489d9a Mon Sep 17 00:00:00 2001 From: shaoying Date: Fri, 14 Aug 2020 14:12:05 +0800 Subject: [PATCH] add git.push --- misc/git/git.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/git/git.go b/misc/git/git.go index d17e4a58..e7dcfab3 100644 --- a/misc/git/git.go +++ b/misc/git/git.go @@ -301,6 +301,10 @@ var Index = &ice.Context{Name: GIT, Help: "代码库", 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, " "))) }}, + "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) { 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 { @@ -317,7 +321,7 @@ var Index = &ice.Context{Name: GIT, Help: "代码库", m.Push("file", vs[1]) } }) - m.PushAction("提交") + m.PushAction("提交", "上传") }}, "_install": {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {