diff --git a/run/run.go b/run/run.go index 667b9d7..f76f9d4 100644 --- a/run/run.go +++ b/run/run.go @@ -15,6 +15,7 @@ package run import ( + "path/filepath" "strings" "github.com/casbin/caswaf/util" @@ -52,6 +53,18 @@ func CreateRepo(siteName string, needStart bool, diff string) int { pid := getPid(siteName) return pid } + } else { + webIndex := filepath.Join(path, "web/build/index.html") + if !util.FileExist(webIndex) { + if strings.HasPrefix(siteName, "cc_") || strings.Count(siteName, "_") == 2 { + index := getNameIndex(siteName) + if index == 0 { + gitWebBuild(path) + } + } else { + gitWebBuild(path) + } + } } }