client도 storageroot지원
This commit is contained in:
@ -2,7 +2,9 @@ package server
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
@ -176,12 +178,17 @@ func (h *houstonHandler) Deploy(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
configPath := ""
|
||||
if _, err := os.Stat(path.Join(h.deployPath, name, "config", "config.json")); err == nil || errors.Is(err, fs.ErrExist) {
|
||||
configPath = path.Join("deploys", name, "config", "config.json")
|
||||
}
|
||||
|
||||
h.Operation().Deploy(MakeDeployRequest(
|
||||
shared.DeployRequest{
|
||||
Name: name,
|
||||
Version: version,
|
||||
Url: path.Join("deploys", name, version, latestFilename),
|
||||
Config: path.Join("deploys", name, "config", "config.json"),
|
||||
Config: configPath,
|
||||
},
|
||||
targets,
|
||||
))
|
||||
@ -338,7 +345,7 @@ func (h *houstonHandler) GetLogFileLinks(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
if version == "latest" {
|
||||
version, _ = shared.FindLastestVersion(path.Join(h.downloadPath, name))
|
||||
version, _ = shared.FindLastestVersion(h.downloadPath, name)
|
||||
}
|
||||
|
||||
root := path.Join(h.downloadPath, name, version)
|
||||
|
||||
Reference in New Issue
Block a user