Self-contained, no-JS landing page (tinygrad-minimal) that doubles as the artifact download host, served by Caddy on an internal :80 box. - site/index.html: static page, "Same tool, only a little different", feature highlights (remote->remote, symmetric panels, ssh_config awareness, edit-in- place, self-copy guard, ...), fixed stable download links, FAQ (unsigned notes). - site/Caddyfile: one flat /dl/ folder with browse + range requests and per-type Cache-Control (patches immutable, update.json no-cache, installers short). - site/deploy.sh: drop a build's artifacts/stable-* into /dl/ (renames the win portable zip to a stable name). - Flat folder matches electrobun's artifacts/ layout, so it's also the future updater baseUrl; per-build folders/symlink dropped in favor of it. - docs/build-and-release.md: document the download host + deploy flow. Verified: caddy validate + live smoke test (links, cache headers, 206 range, 404 fallback, deploy.sh copy/rename) against a temp root. Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.5 KiB
Bash
Executable File
38 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# Publish this machine's built artifacts into the served flat download folder.
|
|
#
|
|
# Run from the repo root AFTER building for this host's target, e.g.:
|
|
# bun scripts/release.ts # or --target mac-x64 / win-x64
|
|
# site/deploy.sh
|
|
#
|
|
# electrobun cannot cross-compile, so each OS/arch is built (and deployed) on its
|
|
# own machine; every run just adds/overwrites that target's files in one flat dir.
|
|
# Installers keep stable names (overwrite in place); .patch files accumulate — never
|
|
# delete old ones, or users on older versions lose their incremental update trail.
|
|
#
|
|
# Serving locally? Leave MINISCP_DL_DIR unset (defaults to /srv/miniscp/dl).
|
|
# Serving on a remote box? Point MINISCP_DL_DIR at a local staging dir, then rsync:
|
|
# MINISCP_DL_DIR=./_dl site/deploy.sh
|
|
# rsync -av ./_dl/ user@host:/srv/miniscp/dl/
|
|
|
|
dl="${MINISCP_DL_DIR:-/srv/miniscp/dl}"
|
|
mkdir -p "$dl"
|
|
|
|
# electrobun's flat artifacts (stable-<os>-<arch>-*): installers, update payloads,
|
|
# update.json, and (once release.baseUrl is set) .patch files.
|
|
if compgen -G 'artifacts/stable-*' >/dev/null; then
|
|
cp -f artifacts/stable-* "$dl"/
|
|
else
|
|
echo "deploy: WARN — no artifacts/stable-* found (did scripts/release.ts run?)" >&2
|
|
fi
|
|
|
|
# Windows portable zip is a release.ts extra (build-numbered) → give it a stable name.
|
|
port=$(ls -1 release/win-x64/*-win-x64-portable.zip 2>/dev/null | head -n1 || true)
|
|
if [ -n "$port" ]; then
|
|
cp -f "$port" "$dl/stable-win-x64-miniSCP-portable.zip"
|
|
fi
|
|
|
|
echo "Published to $dl:"
|
|
ls -1 "$dl"
|