Run go mod tidy before build in all installers
go.sum was never committed (no local Go toolchain to generate it), causing "missing go.sum entry" build failures on target hosts. go mod tidy regenerates it automatically before go build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
6e0e6813f1
commit
f333623035
@@ -67,6 +67,7 @@ fi
|
||||
|
||||
echo "Building wireguard-ui-multi..."
|
||||
cd "$SRC_DIR"
|
||||
go mod tidy
|
||||
go build -o wireguard-ui-multi ./cmd/wireguard-ui-multi
|
||||
|
||||
echo "Running native installer..."
|
||||
|
||||
@@ -19,6 +19,7 @@ fi
|
||||
if [[ ! -f "$BIN_SRC" ]]; then
|
||||
if [[ -d "./cmd/wireguard-ui-multi" ]] && command -v go >/dev/null 2>&1; then
|
||||
echo "Binary not found, building from source with 'go build'..."
|
||||
go mod tidy
|
||||
go build -o "$BIN_SRC" ./cmd/wireguard-ui-multi
|
||||
else
|
||||
echo "Binary not found at $BIN_SRC and cannot build (need Go toolchain + source). Build it first, e.g.:" >&2
|
||||
|
||||
@@ -161,6 +161,7 @@ echo "Running native installer inside container..."
|
||||
pct exec "$VMID" -- bash -c "
|
||||
set -e
|
||||
cd /opt/wireguard-ui-multi-src
|
||||
go mod tidy
|
||||
go build -o wireguard-ui-multi ./cmd/wireguard-ui-multi
|
||||
bash scripts/install.sh
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user