From 03e9dbe9339eb393452e29658b7bdc5a88912758 Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Fri, 6 Oct 2023 00:37:49 +0800 Subject: [PATCH] Add webIndex --- run/run.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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) + } + } } }