From 0d6db1c35ee84e7ac8618bebb321ee20af0f53f9 Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 8 Apr 2024 23:00:33 +0800 Subject: [PATCH] add some --- base/web/space.go | 1 + core/code/publish.go | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/base/web/space.go b/base/web/space.go index e073e205..7d7ad2a6 100644 --- a/base/web/space.go +++ b/base/web/space.go @@ -316,6 +316,7 @@ func init() { m.Push(nfs.VERSION, ice.Info.Make.Versions()) m.Push(nfs.PATHNAME, ice.Info.Pathname) m.Push(ORIGIN, m.Option(ice.MSG_USERHOST)) + m.Push(tcp.HOSTPORT, HostPort(m, m.Cmd(tcp.HOST).Append(aaa.IP), m.Cmd(SERVER).Append(tcp.PORT))) }}, mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) { if mdb.IsSearchPreview(m, arg) { diff --git a/core/code/publish.go b/core/code/publish.go index fa613010..cd5a40fd 100644 --- a/core/code/publish.go +++ b/core/code/publish.go @@ -54,9 +54,7 @@ func _publish_contexts(m *ice.Message, arg ...string) { env := []string{} switch k { case nfs.SOURCE, ice.DEV: - if ice.Info.NodeType == web.SERVER { - m.OptionDefault(nfs.SOURCE, ice.Info.Make.Remote) - } else if m.Option(ice.MSG_USERPOD) == "" { + if m.Option(ice.MSG_USERPOD) == "" { m.OptionDefault(nfs.SOURCE, web.AdminCmd(m, cli.RUNTIME, "make.remote").Result()) } else { m.OptionDefault(nfs.SOURCE, web.AdminCmd(m, web.SPACE, kit.KeyBase(m.Option(ice.MSG_USERPOD)), cli.RUNTIME, "make.remote").Result()) @@ -64,7 +62,7 @@ func _publish_contexts(m *ice.Message, arg ...string) { env = append(env, cli.CTX_REPOS, m.Option(nfs.SOURCE)) fallthrough case nfs.BINARY, ice.APP: - if host := msg.Append(web.ORIGIN); m.Option(web.DOMAIN) != host { + if host := msg.Append(tcp.HOSTPORT); m.Option(web.DOMAIN) != host { env = append(env, cli.CTX_DEV_IP, strings.Split(host, "?")[0]) } if m.Option(ice.MSG_USERPOD) != "" {