rt dev update
rt › dev › update
Update your tools and dev app
Usage
rt dev update [flags]
Arguments & flags
| Flag / Arg | Type | Default | Description |
|---|---|---|---|
--release | boolean | false | Swap a dev app built on this Mac for the release's |
--auto | boolean | false | Update the clone and the dev app together only when the clone is clean and on main, as the daemon does each hour |
--json | boolean | false | Machine-readable result |
See code: commands/dev.ts › devUpdate
Examples & notes
On a dev Mac, the daemon checks for a new release about once an hour and runs rt dev update --auto by itself. It checks everything before it changes anything, then updates your clone and the dev app together:
- It fetches
origin/mainand checks the clone. It goes on only when the clone is onmain, has no uncommitted or untracked files, no commits that are not onorigin/main, and no merge or rebase in progress. - It waits while the daemon is busy, and checks that your bun and Go meet the versions
origin/mainneeds. - It fast-forwards the clone, runs
bun install --frozen-lockfile, rebuilds rt's terminal helper when it changed, builds the served apps, and serves them from the clone again. - Last, it swaps in the new dev app and restarts the daemon.
If a step after the fast-forward fails (the install, a build), the clone is already on the new commit and the dev app is not swapped. The notification names the step; fix it and run rt dev update, which redoes the install and the builds.
When the clone does not pass, nothing changes. A notification says why, once per release and reason, for example Your clone has uncommitted changes. Commit or set the change aside, switch back to main, and the next hourly check finishes the update. A dev app built on this Mac is never replaced, and an org with mattstack.autoUpdate off gets no automatic update at all.
Run it by hand any time:
rt dev update
By hand, a clone that passes the same checks is fast-forwarded first. One that does not is left as it is with its reason as a note, and the dev app is still installed.