Automates what was previously a six-step manual process that, twice in this codebase's history, has produced version skew between git and the released tarball (v1.2.0 was published with package.json 1.2.0 in the tarball but the bump was never committed back to gitea — making "what code is in v1.2.0?" answerable only by extracting the tarball). The script: - Refuses to run with a dirty tree, off main, or already at the target version. - Bumps dashcaddy-api/package.json, rebuilds status/dist/, commits + pushes to gitea — so the released artifact and gitea HEAD are always in lockstep. - Clones gitea HEAD on the release host, verifies the cloned commit matches what we just pushed (catches a stale clone or a missed push), tars it, computes sha256, writes version.json. - Refreshes install.sh on the release host alongside the tarball (fresh installs use the install.sh from the latest release). - Mirrors the release dir to the get2 backup via rsync. - Verifies live by curling version.json and re-hashing the served tarball. Hosts overridable via DASHCADDY_RELEASE_HOST / DASHCADDY_MIRROR_HOST / DASHCADDY_GITEA_URL env vars. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6.5 KiB
6.5 KiB