forked from x/icebergs
add some
This commit is contained in:
parent
da8cc86e3a
commit
bf91715f8f
@ -277,8 +277,8 @@ func ParseMake(str string) []string {
|
||||
version := kit.Format(kit.Value(data, nfs.VERSION))
|
||||
if kit.Format(kit.Value(data, "forword")) != "0" {
|
||||
version = kit.Join(kit.TrimArg(kit.Simple(
|
||||
kit.Format(kit.Value(data, nfs.VERSION)),
|
||||
kit.Format(kit.Value(data, "forword")),
|
||||
kit.Select("v0.0.0", kit.Format(kit.Value(data, nfs.VERSION))),
|
||||
kit.Select("0", kit.Format(kit.Value(data, "forword"))),
|
||||
kit.Cut(kit.Format(kit.Value(data, mdb.HASH)), 6),
|
||||
)...), "-")
|
||||
}
|
||||
|
@ -451,6 +451,8 @@ func init() {
|
||||
switch m.Option(mdb.TYPE) {
|
||||
case WORKER:
|
||||
list = append(list, "settings", tcp.SEND, OPEN)
|
||||
case SERVER:
|
||||
list = append(list, DREAM, OPEN)
|
||||
default:
|
||||
list = append(list, TOKEN, DREAM, OPEN)
|
||||
}
|
||||
|
@ -98,19 +98,18 @@ func _autogen_git(m *ice.Message, arg ...string) ice.Map {
|
||||
)
|
||||
}
|
||||
func _autogen_mod(m *ice.Message, file string) (mod string) {
|
||||
host := m.Cmdx(REPOS, REMOTE_URL)
|
||||
if host != "" {
|
||||
host = strings.Split(host, "://")[1]
|
||||
if strings.Contains(host, ":") {
|
||||
host = path.Base(host)
|
||||
}
|
||||
} else {
|
||||
host = kit.ParseURL(kit.Select(m.Option(ice.MSG_USERHOST), ice.Info.Make.Remote)).Hostname()
|
||||
host := kit.Select(ice.Info.Make.Remote, m.Cmdx(REPOS, REMOTE_URL))
|
||||
if host == "" {
|
||||
host = m.Option(ice.MSG_USERHOST)
|
||||
if host == "" || !strings.HasPrefix(host, ice.HTTP) {
|
||||
host = path.Base(kit.Path(""))
|
||||
} else {
|
||||
host = strings.Split(host, "://")[1]
|
||||
host = path.Join(host, "x", path.Base(kit.Path("")))
|
||||
kit.If(strings.Contains(host, ":"), func() { host = path.Base(host) })
|
||||
}
|
||||
} else {
|
||||
host = strings.Split(host, "://")[1]
|
||||
}
|
||||
m.Cmd(nfs.DEFS, file, kit.Format(nfs.Template(m, ice.GO_MOD), host))
|
||||
// ReposAddFile(m, "", ice.GO_MOD)
|
||||
|
@ -46,11 +46,9 @@ func _publish_file(m *ice.Message, file string, arg ...string) string {
|
||||
}
|
||||
func _publish_contexts(m *ice.Message, arg ...string) {
|
||||
// m.Options(nfs.DIR_ROOT, "")
|
||||
m.Debug("what %v", m.Option(web.DREAM))
|
||||
m.Debug("what %v", m.Option(nfs.SOURCE))
|
||||
m.OptionDefault(web.DOMAIN, tcp.PublishLocalhost(m, web.UserHost(m)))
|
||||
m.OptionDefault(cli.CTX_CLI, "temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi; source $temp")
|
||||
m.OptionDefault(cli.CTX_ARG, kit.JoinCmds(aaa.USERNAME, m.Option(ice.MSG_USERNAME), aaa.USERNICK, m.Option(ice.MSG_USERNICK), aaa.LANGUAGE, m.Option(ice.MSG_LANGUAGE)))
|
||||
m.OptionDefault(cli.CTX_ARG, kit.JoinCmdArgs(aaa.USERNAME, m.Option(ice.MSG_USERNAME), aaa.USERNICK, m.Option(ice.MSG_USERNICK), aaa.LANGUAGE, m.Option(ice.MSG_LANGUAGE)))
|
||||
for _, k := range kit.Default(arg, ice.MISC) {
|
||||
env := []string{}
|
||||
switch k {
|
||||
|
Loading…
x
Reference in New Issue
Block a user