diff --git a/Makefile b/Makefile index dd9f8336d..a0194001a 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ ifeq ($(OS),Windows_NT) SET := set endif +release: generate ui build + build: $(eval DATE := $(shell go run scripts/getDate.go)) $(eval GITHASH := $(shell git rev-parse --short HEAD)) diff --git a/pkg/api/server.go b/pkg/api/server.go index 49abbe158..c7d0e98f5 100644 --- a/pkg/api/server.go +++ b/pkg/api/server.go @@ -129,7 +129,7 @@ func Start() { r.HandleFunc("/setup*", func(w http.ResponseWriter, r *http.Request) { ext := path.Ext(r.URL.Path) if ext == ".html" || ext == "" { - data := setupUIBox.Bytes("index.html") + data, _ := setupUIBox.Find("index.html") _, _ = w.Write(data) } else { r.URL.Path = strings.Replace(r.URL.Path, "/setup", "", 1) @@ -193,7 +193,7 @@ func Start() { r.HandleFunc("/*", func(w http.ResponseWriter, r *http.Request) { ext := path.Ext(r.URL.Path) if ext == ".html" || ext == "" { - data := uiBox.Bytes("index.html") + data, _ := uiBox.Find("index.html") _, _ = w.Write(data) } else { http.FileServer(uiBox).ServeHTTP(w, r)