deleteDeploySource, undeploy 추가
This commit is contained in:
@ -46,10 +46,10 @@ func (h *houstonHandler) RegisterHandlers(serveMux *http.ServeMux, prefix string
|
||||
logger.Println("houstonHandler registed")
|
||||
serveMux.Handle("/"+path.Join(prefix, "houston"), h)
|
||||
|
||||
fsx := http.FileServer(http.Dir("./deploys"))
|
||||
fsx := http.FileServer(http.Dir("deploys"))
|
||||
serveMux.Handle(fmt.Sprintf("/%s/deploys/", prefix), http.StripPrefix(fmt.Sprintf("/%s/deploys/", prefix), fsx))
|
||||
|
||||
ufsx := http.FileServer(http.Dir("./downloads"))
|
||||
ufsx := http.FileServer(http.Dir("downloads"))
|
||||
serveMux.Handle(fmt.Sprintf("/%s/houston/downloads/", prefix), http.StripPrefix(fmt.Sprintf("/%s/houston/downloads/", prefix), ufsx))
|
||||
|
||||
serveMux.HandleFunc("/"+path.Join(prefix, "upload"), func(w http.ResponseWriter, r *http.Request) {
|
||||
@ -66,7 +66,7 @@ func (h *houstonHandler) RegisterHandlers(serveMux *http.ServeMux, prefix string
|
||||
name := r.Header.Get("Houston-Service-Name")
|
||||
version := r.Header.Get("Houston-Service-Version")
|
||||
filename := r.Header.Get("Houston-Service-Filename")
|
||||
dir := fmt.Sprintf("./downloads/%s/%s", name, version)
|
||||
dir := fmt.Sprintf("downloads/%s/%s", name, version)
|
||||
if err := os.MkdirAll(dir, os.ModePerm); err == nil {
|
||||
file, _ := os.Create(path.Join(dir, filename))
|
||||
if file != nil {
|
||||
|
||||
Reference in New Issue
Block a user