1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-04-07 02:06:43 +08:00
parent 03f3d4d8c3
commit f310a782c4
2 changed files with 3 additions and 2 deletions

View File

@ -117,7 +117,7 @@ const ( // DIR
PLUGIN_LOCAL = "/plugin/local/" PLUGIN_LOCAL = "/plugin/local/"
PLUGIN_STORY = "/plugin/story/" PLUGIN_STORY = "/plugin/story/"
PLUGIN_TABLE_JS = "/plugin/table.js" PLUGIN_TABLE_JS = "/plugin/table.js"
PKG_MOD = "/pkd/mod/" PKG_MOD = "/pkg/mod/"
ISH_PLUGED = ".ish/pluged/" ISH_PLUGED = ".ish/pluged/"
USR_INSTALL = "usr/install/" USR_INSTALL = "usr/install/"

View File

@ -29,8 +29,9 @@ func init() {
}}, }},
SYNC: {Help: "同步", Hand: func(m *ice.Message, arg ...string) { SYNC: {Help: "同步", Hand: func(m *ice.Message, arg ...string) {
repos := map[string]string{} repos := map[string]string{}
m.Cmds(web.CODE_GIT_STATUS).Table(func(value ice.Maps) { repos[strings.Split(value[web.ORIGIN], "://")[1]] = value[nfs.VERSION] }) m.Cmds(web.CODE_GIT_REPOS).Table(func(value ice.Maps) { repos[strings.Split(value[web.ORIGIN], "://")[1]] = value[nfs.VERSION] })
m.Cmd(web.CODE_MOD, mdb.RENDER, MOD, ice.GO_MOD, nfs.PWD).Table(func(value ice.Maps) { repos[value[REQUIRE]] = value[VERSION] }) m.Cmd(web.CODE_MOD, mdb.RENDER, MOD, ice.GO_MOD, nfs.PWD).Table(func(value ice.Maps) { repos[value[REQUIRE]] = value[VERSION] })
m.Debug("what %v", kit.Formats(repos))
res := m.Cmdx(nfs.CAT, path.Join(nfs.USR_LOCAL_WORK, m.Option(SPACE), ice.GO_MOD), func(ls []string, text string) string { res := m.Cmdx(nfs.CAT, path.Join(nfs.USR_LOCAL_WORK, m.Option(SPACE), ice.GO_MOD), func(ls []string, text string) string {
if len(ls) > 1 { if len(ls) > 1 {
if v, ok := repos[ls[0]]; ok && !strings.Contains(v, "-") { if v, ok := repos[ls[0]]; ok && !strings.Contains(v, "-") {