mirror of
https://shylinux.com/x/icebergs
synced 2025-04-27 01:48:27 +08:00
opt some
This commit is contained in:
parent
d77e8161d5
commit
82c8f3a18b
@ -119,10 +119,10 @@ go 1.11
|
|||||||
|
|
||||||
func _autogen_git(m *ice.Message, arg ...string) ice.Map {
|
func _autogen_git(m *ice.Message, arg ...string) ice.Map {
|
||||||
return kit.Dict("Path", kit.Path(""), "Time", m.Time(), arg,
|
return kit.Dict("Path", kit.Path(""), "Time", m.Time(), arg,
|
||||||
"Hash", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "log", "-n1", `--pretty=%H`)),
|
"Hash", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "log", "-n1", `--pretty=%H`)),
|
||||||
"Remote", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "config", "remote.origin.url")),
|
"Remote", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "config", "remote.origin.url")),
|
||||||
"Branch", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "rev-parse", "--abbrev-ref", "HEAD")),
|
"Branch", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "rev-parse", "--abbrev-ref", "HEAD")),
|
||||||
"Version", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "describe", "--tags")),
|
"Version", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "describe", "--tags")),
|
||||||
"Domain", m.Option(ice.MSG_USERWEB),
|
"Domain", m.Option(ice.MSG_USERWEB),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -136,8 +136,17 @@ func _autogen_gits(m *ice.Message, arg ...string) string {
|
|||||||
func _autogen_version(m *ice.Message) {
|
func _autogen_version(m *ice.Message) {
|
||||||
if mod := _autogen_mod(m, ice.GO_MOD); !kit.FileExists(".git") {
|
if mod := _autogen_mod(m, ice.GO_MOD); !kit.FileExists(".git") {
|
||||||
m.Cmdy(cli.SYSTEM, GIT, ice.INIT)
|
m.Cmdy(cli.SYSTEM, GIT, ice.INIT)
|
||||||
m.Cmdy(cli.SYSTEM, GIT, "remote", "add", "origin", "https://"+mod)
|
m.Cmd(cli.SYSTEM, GIT, "remote", "add", "origin", "https://"+mod)
|
||||||
m.Cmd("web.code.git.repos", mdb.CREATE, "repos", "https://"+mod, "name", path.Base(mod), "path", "./")
|
m.Cmd("web.code.git.repos", mdb.CREATE, "repos", "https://"+mod, mdb.NAME, path.Base(mod), nfs.PATH, nfs.PWD)
|
||||||
|
m.Cmd(cli.SYSTEM, GIT, "add", ice.GO_MOD, ice.SRC, ice.ETC_MISS_SH)
|
||||||
|
m.Cmd(nfs.DEFS, ".gitignore", kit.Format(`src/binpack.go
|
||||||
|
src/version.go
|
||||||
|
etc/
|
||||||
|
bin/
|
||||||
|
var/
|
||||||
|
usr/
|
||||||
|
.*
|
||||||
|
`))
|
||||||
}
|
}
|
||||||
|
|
||||||
m.Cmd(nfs.DEFS, ice.SRC_BINPACK_GO, kit.Format(`package main
|
m.Cmd(nfs.DEFS, ice.SRC_BINPACK_GO, kit.Format(`package main
|
||||||
|
@ -18,7 +18,7 @@ func _js_main_script(m *ice.Message, arg ...string) (res []string) {
|
|||||||
res = append(res, kit.Format(`require("%s")`, kit.Path("usr/volcanos/publish/client/nodejs/proto.js")))
|
res = append(res, kit.Format(`require("%s")`, kit.Path("usr/volcanos/publish/client/nodejs/proto.js")))
|
||||||
} else {
|
} else {
|
||||||
for _, file := range []string{"proto.js", "frame.js", "lib/base.js", "lib/core.js", "lib/misc.js", "lib/page.js", "publish/client/nodejs/proto.js"} {
|
for _, file := range []string{"proto.js", "frame.js", "lib/base.js", "lib/core.js", "lib/misc.js", "lib/page.js", "publish/client/nodejs/proto.js"} {
|
||||||
res = append(res, `_can_name = "./`+file+`"`)
|
res = append(res, `_can_name = "`+kit.Path(ice.USR_VOLCANOS, file)+`"`)
|
||||||
res = append(res, string(ice.Info.Pack[ice.PS+file]))
|
res = append(res, string(ice.Info.Pack[ice.PS+file]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg) {
|
|||||||
}})
|
}})
|
||||||
`,
|
`,
|
||||||
nfs.ZML, `
|
nfs.ZML, `
|
||||||
left
|
{
|
||||||
username
|
username
|
||||||
系统
|
系统
|
||||||
命令 index cli.system
|
命令 index cli.system
|
||||||
@ -45,7 +45,7 @@ left
|
|||||||
数据 index hi/hi.py
|
数据 index hi/hi.py
|
||||||
后端 index hi/hi.go
|
后端 index hi/hi.go
|
||||||
前端 index hi/hi.js
|
前端 index hi/hi.js
|
||||||
main
|
}
|
||||||
`,
|
`,
|
||||||
nfs.IML, `
|
nfs.IML, `
|
||||||
系统
|
系统
|
||||||
|
Loading…
x
Reference in New Issue
Block a user