From 9306058e90e3069369d6575374aa1d3e62969e60 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 30 Jul 2026 18:58:53 +0000 Subject: [PATCH] use replace for web instead of static import --- Makefile | 8 +++++--- app/app.go | 2 +- go.mod | 2 ++ web/go.mod | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 web/go.mod diff --git a/Makefile b/Makefile index 8f95981..f1acfbd 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,6 @@ build: clean ensure-dist build-web build-wfa-js # resolve symbolic links in web by copying it into dist/web/ CGO_ENABLED=0 go build -tags release -ldflags="-s -w" -v -o dist/ . -ensure-dist: - mkdir -p dist - build-web: ensure-dist cp -rL web/ dist/web/ @@ -22,3 +19,8 @@ clean: clean-wfa-js clean-wfa-js: $(MAKE) clean -C WFA-JS + +ensure-dist: + mkdir -p dist + +workflow-init: ensure-dist build-web build-wfa-js diff --git a/app/app.go b/app/app.go index 8643ce8..aabd32e 100644 --- a/app/app.go +++ b/app/app.go @@ -6,7 +6,7 @@ import ( "log" "proxmoxaas-dashboard/app/common" "proxmoxaas-dashboard/app/routes" - "proxmoxaas-dashboard/dist/web" // go will complain here until the first build + "web" // go will complain here until the first build "github.com/gin-gonic/gin" "github.com/tdewolff/minify/v2" diff --git a/go.mod b/go.mod index 8a2290b..699a964 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,11 @@ require ( github.com/go-viper/mapstructure/v2 v2.5.0 github.com/tdewolff/minify/v2 v2.24.13 proxmoxaas-common-lib v0.0.0 + web v0.0.0 ) replace proxmoxaas-common-lib => ./proxmoxaas-common-lib +replace web => ./dist/web require ( github.com/bytedance/gopkg v0.1.4 // indirect diff --git a/web/go.mod b/web/go.mod new file mode 100644 index 0000000..32b9c93 --- /dev/null +++ b/web/go.mod @@ -0,0 +1,3 @@ +module web + +go 1.26.0