deleteDeploySource, undeploy 추가

This commit is contained in:
2023-05-30 12:12:23 +09:00
parent 18e7cbf75e
commit 3161afd091
5 changed files with 67 additions and 12 deletions

View File

@ -160,7 +160,7 @@ func (hc *houstonClient) prepareDeploy(name string, version string) (destPath st
}
}()
verpath := path.Join("./", name, version)
verpath := path.Join(name, version)
if _, err := os.Stat(verpath); os.IsNotExist(err) {
// 없네? 만들면 된다.
err = os.MkdirAll(verpath, fs.FileMode(os.O_WRONLY))
@ -210,7 +210,7 @@ func (hc *houstonClient) deploy(req *shared.DeployRequest) error {
}
func (hc *houstonClient) withdraw(req *shared.WithdrawRequest) error {
fd, _ := os.Stat(path.Join("./", req.Name, req.Version))
fd, _ := os.Stat(path.Join(req.Name, req.Version))
if fd != nil {
if fd.IsDir() {
for _, running := range hc.childProcs {
@ -222,7 +222,7 @@ func (hc *houstonClient) withdraw(req *shared.WithdrawRequest) error {
}
}
return os.RemoveAll(path.Join("./", req.Name, req.Version))
return os.RemoveAll(path.Join(req.Name, req.Version))
}
}