From 61bf553a2578909e1531a03217f3e07d769661ca Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Thu, 6 Aug 2026 19:50:23 -0700 Subject: [PATCH] fix(release): move the mirror out of the website dist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release mirror lived in BitFun-Website/dist/release. `npm run build` empties dist/, so every website deploy deleted the mirrored installers and manifests — downloads and the updater fallback 404'd until the next cron sync re-downloaded ~2.3 GB from GitHub. Point WEBSITE_RELEASE_DIR at /srv/bitfun-release instead, outside any build output, and let the environment override it. nginx serves that directory through a `location ^~ /release/` alias, so the public URLs are unchanged. --- scripts/openbitfun-release-sync.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/openbitfun-release-sync.sh b/scripts/openbitfun-release-sync.sh index b880a26f3..20ca88a17 100755 --- a/scripts/openbitfun-release-sync.sh +++ b/scripts/openbitfun-release-sync.sh @@ -46,7 +46,12 @@ GITHUB_LATEST_JSON_URL="https://github.com/GCWing/BitFun/releases/latest/downloa GITHUB_LINUX_BINARIES_URL="https://github.com/GCWing/BitFun/releases/latest/download/linux-binaries.json" GITHUB_RELAY_IMAGE_URL="https://github.com/GCWing/BitFun/releases/latest/download/relay-image.json" OPENBITFUN_BASE_URL="https://openbitfun.com/release" -WEBSITE_RELEASE_DIR="/root/repos/BitFun-Website/dist/release" +# The mirror deliberately lives outside the website checkout. It used to be +# BitFun-Website/dist/release, but `npm run build` empties dist/, so every +# website deploy silently deleted the mirrored installers and manifests — +# breaking downloads and the updater fallback until someone noticed. nginx +# serves this directory through a `location ^~ /release/` alias instead. +WEBSITE_RELEASE_DIR="${WEBSITE_RELEASE_DIR:-/srv/bitfun-release}" LOCK_FILE="/root/repos/BitFun-AutoUpdate/sync.lock" WINDOWS_INSTALLER_FILENAME="bitfun-installer.exe" WEBSITE_DOWNLOADS_MANIFEST="downloads.json"