From 7b77b355debe529b523b07397685fa506c5a3440 Mon Sep 17 00:00:00 2001 From: liruichen Date: Fri, 8 Sep 2023 10:35:18 +0800 Subject: [PATCH] feat: add commit HASH to extra v2 --- pkg/build/agent.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/build/agent.tpl b/pkg/build/agent.tpl index cd10605..5ede6e9 100644 --- a/pkg/build/agent.tpl +++ b/pkg/build/agent.tpl @@ -45,7 +45,7 @@ var ( token string id string cond = sync.NewCond(&sync.Mutex{}) - register_extra = os.Getenv("GOC_REGISTER_EXTRA") + register_extra = "" ) func init() { @@ -116,6 +116,7 @@ func register (host string) { continue } + register_extra = os.Getenv("ECHO_APP_ID") + {{.CommitID}} // 注册,直接将元信息放在 ws 地址中 v := url.Values{} v.Set("hostname", ps.hostname)