Add 'local' deploy mode to Deploy-Brass.ps1

When ServerSshHost = 'local' the server-binary stage skips scp/ssh and
does an in-place Copy-Item + chmod + Move-Item on the local filesystem.
Pre-flight pgrep also runs locally. Allows running the deploy script on
the server itself (glados in our case) without setting up ssh-to-self.

Other deploy modes (remote scp/ssh) unchanged.
This commit is contained in:
2026-05-22 14:06:41 +00:00
parent e0b9278da4
commit f280e107f3
2 changed files with 51 additions and 17 deletions
+9 -2
View File
@@ -19,13 +19,20 @@ $ManifestPublicUrl = 'https://CHANGE_ME/pack/manifest.json'
# ─── Server (brass-sigil-server daemon host) ───────────────────────────────
# user@host for the Linux box running the daemon.
#
# Set to the literal string 'local' if Deploy-Brass.ps1 is being run on the
# server itself (e.g. on glados over the Telegram bridge). In local mode the
# script skips scp/ssh and copies the binary directly to $ServerBinaryRemote
# with an in-place atomic rename; $ServerSshKey is ignored.
$ServerSshHost = 'user@CHANGE_ME'
# Path to the local SSH private key authorised on the server.
# Ignored when $ServerSshHost = 'local'.
$ServerSshKey = "$env:USERPROFILE\.ssh\id_ed25519"
# Absolute path on the Linux box where the brass-sigil-server binary lives.
# `Deploy-Brass.ps1` uploads to "<this>.new" then `mv` over for atomic swap.
# Absolute path where the brass-sigil-server binary lives -- on the remote
# host in SSH mode, on the local filesystem in 'local' mode.
# `Deploy-Brass.ps1` writes to "<this>.new" then renames over for atomic swap.
$ServerBinaryRemote = '/home/user/brass-sigil-server/brass-sigil-server'
# ─── Build outputs (don't normally need to change) ─────────────────────────