[Agent][Deploy] - sz ga

This commit is contained in:
zeaslity
2024-05-18 09:09:27 +08:00
parent d7be02253f
commit 46e488f891
8 changed files with 118 additions and 12 deletions

View File

@@ -308,10 +308,15 @@ func uniformAgentServerName(agentInfo *a_status.AgentInfo, agentServerInfo *a_ag
// 不是标准的AgentName格式
city := agentServerInfo.City
city = strings.Title(city)
if strings.Contains(city, " ") {
city = strings.Join(strings.Split(city, " "), "")
if city == "" {
city = "Local"
} else {
city = strings.Title(city)
if strings.Contains(city, " ") {
city = strings.Join(strings.Split(city, " "), "")
}
}
// uniform city format
agentServerInfo.City = city

View File

@@ -9,6 +9,8 @@ import (
var log = logger.Log
// C:\Users\wddsh\go\bin\gox.exe -osarch="linux/amd64" -output "build/agent-operator_{{.OS}}_{{.Arch}}"
// /root/go/bin/gox -osarch="linux/amd64" -output "build/octopus-agent_{{.OS}}_{{.Arch}}"
func main() {
// 解析命令行参数