From 70d7a4f606bfc4846dbacee24c7da8128ccbe507 Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Sun, 20 Sep 2026 20:25:37 -0500 Subject: [PATCH] Default push_desktop.sh to the jakerasp deploy checkout The remote feed copy now happens by default (overridable with J621_DESKTOP_FEED_HOST or --host, skippable with --local), so a release is one command on the build machine. --- deploy/README.md | 15 ++++++++------- deploy/push_desktop.sh | 14 ++++++++++---- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/deploy/README.md b/deploy/README.md index e780396..fbcc710 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -150,16 +150,17 @@ prints sizes and SHA-256 sums for the release notes. Push the desktop builds and their update metadata to the frontend's feed: ```bash -./push_desktop.sh # Linux packages (deb + pacman) +./push_desktop.sh # build Linux packages + copy the feed to jakerasp ./push_desktop.sh --win # also cross-build the NSIS installer (wine) -./push_desktop.sh --win --host jakerasp:/home/jake/servers/J621 +./push_desktop.sh --local # publish locally only, skip the remote copy +./push_desktop.sh --host other:/path/to/J621 ``` -Artifacts land in `deploy/data/desktop/`, which the frontend nginx mounts -read-only and serves at `/desktop/`. `--host` also copies that directory to -a remote deploy checkout — rsync when both ends have it, tar over ssh when -the server does not — so the build can run here and prod only receives the -files. The desktop app's "Check for updates…" menu item reads +The remote copy defaults to `jakerasp:/home/jake/servers/J621`, or +`$J621_DESKTOP_FEED_HOST` when set. Artifacts land in `deploy/data/desktop/`, +which the frontend nginx mounts read-only and serves at `/desktop/`. The +remote copy uses rsync when both ends have it, tar over ssh when the server +does not. The desktop app's "Check for updates…" menu item reads `latest-linux.yml` / `latest.yml` from there (see `desktop/README.md`). Backend-only composes have no frontend, so no feed. diff --git a/deploy/push_desktop.sh b/deploy/push_desktop.sh index 6c6d9ff..55443c9 100755 --- a/deploy/push_desktop.sh +++ b/deploy/push_desktop.sh @@ -7,23 +7,29 @@ # has no rsync). electron-updater reads latest-linux.yml / latest.yml from # there; the feed URL comes from desktop/electron-builder.yml. # -# Usage: ./push_desktop.sh [--win] [--no-build] [--host user@server:/path] +# Usage: ./push_desktop.sh [--win] [--no-build] [--local] [--host user@server:/path] # --win also cross-build the Windows NSIS installer (needs wine) # --no-build publish what is already in desktop/release/ -# --host remote deploy checkout, e.g. jakerasp:/home/jake/servers/J621 +# --local only publish locally, skip the remote copy +# --host override the remote deploy checkout +# +# The remote copy defaults to $J621_DESKTOP_FEED_HOST, or +# jakerasp:/home/jake/servers/J621 when that is not set. set -euo pipefail cd "$(dirname "$0")/.." +DEFAULT_REMOTE="jakerasp:/home/jake/servers/J621" BUILD=1 WIN=0 -REMOTE="" +REMOTE="${J621_DESKTOP_FEED_HOST:-$DEFAULT_REMOTE}" while [ $# -gt 0 ]; do case "$1" in --win) WIN=1 ;; --no-build) BUILD=0 ;; + --local) REMOTE="" ;; --host) REMOTE="${2:?--host needs user@server:/path}"; shift ;; *) - echo "usage: $0 [--win] [--no-build] [--host user@server:/path]" >&2 + echo "usage: $0 [--win] [--no-build] [--local] [--host user@server:/path]" >&2 exit 2 ;; esac