1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 09:34:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2022-07-17 22:28:21 +08:00
parent d77e8161d5
commit 82c8f3a18b
3 changed files with 18 additions and 9 deletions

View File

@ -119,10 +119,10 @@ go 1.11
func _autogen_git(m *ice.Message, arg ...string) ice.Map {
return kit.Dict("Path", kit.Path(""), "Time", m.Time(), arg,
"Hash", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "log", "-n1", `--pretty=%H`)),
"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")),
"Version", strings.TrimSpace(m.Cmdx(cli.SYSTEM, "git", "describe", "--tags")),
"Hash", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "log", "-n1", `--pretty=%H`)),
"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")),
"Version", strings.TrimSpace(m.Cmdx(cli.SYSTEM, GIT, "describe", "--tags")),
"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) {
if mod := _autogen_mod(m, ice.GO_MOD); !kit.FileExists(".git") {
m.Cmdy(cli.SYSTEM, GIT, ice.INIT)
m.Cmdy(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(cli.SYSTEM, GIT, "remote", "add", "origin", "https://"+mod)
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

View File

@ -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")))
} 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"} {
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]))
}
}

View File

@ -31,7 +31,7 @@ Volcanos("onimport", {help: "导入数据", _init: function(can, msg) {
}})
`,
nfs.ZML, `
left
{
username
系统
命令 index cli.system
@ -45,7 +45,7 @@ left
数据 index hi/hi.py
后端 index hi/hi.go
前端 index hi/hi.js
main
}
`,
nfs.IML, `
系统