Generalize the deploy instructions in the dev doc

The "Testing on another machine" section hard-coded the build host (`nuc-zt`)
and repo path (`~/src/regent`), so it read as notes for one particular setup.
It is now "Deploying to another machine": the two scripts are described
generically, the copy-paste uses `BUILD_HOST` / `PATH/TO/regent` placeholders,
and the `REGENT_BUILD_HOST` and `REGENT_REPO_PATH` overrides are documented
(with the old values noted as their defaults). `--emit` joins the on-host
list, and the narrative is build-host/test-machine rather than naming specific
machines.
This commit is contained in:
raucao committed 2026-11-29 22:49:12 +04:00
1 parent 680229138d
commit 9484c56665
1 file changed
+33 -22
+33 -22
View File
@@ -96,46 +96,57 @@ desktop-file-validate _build/data/org.kosmos.raucao.Regent.desktop
glib-compile-schemas --strict --dry-run _build/data/
```
## Testing on another machine
## Deploying to another machine
The build host compiles; you test on the workstation it should actually run on.
`build-aux/deploy-dev.sh` runs on the build host and `build-aux/regent-deploy.sh`
on the workstation; a build is moved with the workstation *pulling*, so nothing
new listens for connections anywhere.
If you build on one machine and run on another — a fast build host and the desktop
you test on — two helper scripts move a build across. `build-aux/deploy-dev.sh`
runs on the build host; `build-aux/regent-deploy.sh` runs on the machine you test
on. The test machine *pulls* the build over SSH, so neither side has to listen for
inbound connections. You need SSH from the test machine to the build host.
Install the wrapper once, on the workstation:
Install the wrapper once, on the test machine:
```sh
mkdir -p ~/.local/bin
ssh nuc-zt 'cat ~/src/regent/build-aux/regent-deploy.sh' > ~/.local/bin/regent-deploy
ssh BUILD_HOST 'cat PATH/TO/regent/build-aux/regent-deploy.sh' > ~/.local/bin/regent-deploy
chmod +x ~/.local/bin/regent-deploy
```
Then, after every change:
Then point it at your build host and repository path, either by exporting them or
by editing the defaults at the top of the script:
```sh
export REGENT_BUILD_HOST=user@build-host # default: nuc-zt
export REGENT_REPO_PATH='~/src/regent' # default: ~/src/regent
```
After every change, on the test machine:
```sh
regent-deploy
```
The wrapper keeps itself current: before doing anything it fetches its own copy
from the build host and re-execs if it changed, so the one-time install above
never goes stale. (`REGENT_DEPLOY_NO_UPDATE=1` skips that, and the previous copy
is kept as `regent-deploy.bak`.)
It asks the build host which GTK/libadwaita it builds against and warns if the two
machines have drifted (a mismatch surfaces later as a symbol lookup error), pulls
the install tree, unpacks it into `~/.local` (no root needed), recompiles the
GSettings schema, and prints the version it installed. The wrapper keeps itself
current — it fetches its own copy from the build host and re-execs if it changed,
so the one-time install above never goes stale (`REGENT_DEPLOY_NO_UPDATE=1` skips
that; the previous copy is kept as `regent-deploy.bak`).
That asks the build host which GTK/libadwaita it builds against, warns if the two
machines have drifted (a mismatch surfaces as a symbol lookup error), pulls the
install tree, unpacks it into `~/.local` (no root needed), recompiles the
GSettings schema, and prints the version it installed. `REGENT_DEPLOY_PKG=1
regent-deploy` builds and installs a real `regent-git` package instead (asks for
`sudo`). `REGENT_PROFILE=development regent-deploy` installs the nightly identity
instead — `regent-devel`, its own desktop file and data directories — so it runs
beside a stable install rather than replacing it. Only the stable build handles
`nostrconnect://` links; the nightly never takes that association over.
Options:
Directly on the build host, without a workstation:
- `REGENT_DEPLOY_PKG=1 regent-deploy` — build and install a real `regent-git`
package instead (asks for `sudo`).
- `REGENT_PROFILE=development regent-deploy` — install the nightly `.Devel`
identity instead; it has its own app id, desktop file and data directories, so
it runs beside a stable install rather than replacing it.
Directly on the build host, with no test machine:
```sh
build-aux/deploy-dev.sh # write a tarball to /tmp/regent-dev/
build-aux/deploy-dev.sh --emit # stream the install tree to stdout
build-aux/deploy-dev.sh --pkg # build the regent-git pacman package
build-aux/deploy-dev.sh --versions # GTK/libadwaita this host builds against
build-aux/deploy-dev.sh --help