서비스 태그를 하위 버전에도 붙여줌
This commit is contained in:
@ -45,12 +45,13 @@ func (h *houstonHandler) GetDeploySources(w http.ResponseWriter, r *http.Request
|
||||
getVersions := func(name string) []string {
|
||||
var out []string
|
||||
vers, _ := os.ReadDir(path.Join(h.deployPath, name))
|
||||
mytags, _ := os.ReadFile(path.Join(h.deployPath, name, "@tags"))
|
||||
for _, fd := range vers {
|
||||
if fd.IsDir() {
|
||||
ver := fd.Name()
|
||||
files, _ := os.ReadDir(path.Join(h.deployPath, name, ver))
|
||||
vertags, _ := os.ReadFile(path.Join(h.deployPath, name, ver, "@tags"))
|
||||
ver = ver + string(vertags)
|
||||
ver = ver + string(mytags) + string(vertags)
|
||||
|
||||
if len(files) > 0 {
|
||||
for _, file := range files {
|
||||
@ -66,10 +67,7 @@ func (h *houstonHandler) GetDeploySources(w http.ResponseWriter, r *http.Request
|
||||
out = append(out, ver)
|
||||
}
|
||||
}
|
||||
mytags, _ := os.ReadFile(path.Join(h.deployPath, name, "@tags"))
|
||||
if len(mytags) > 0 {
|
||||
out = append(out, string(mytags))
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user