rafa pages
- rafa
- rafa update
rafa update
Bring a project to the installed rafa; the other updates, of rafa itself, a project version or the board, are in development.
rafa update current brings a project to the installed rafa: it creates the .rafa/ folders and board labels newer versions expect, and records the version in rafa.lock at the project root, a small file meant to be committed. The other actions are in development and say so: each refuses with exit code 1, naming its issue, and changes nothing.
Spends: nothing. Changes: current writes folders, labels and rafa.lock, after printing every change and asking once (--dry-run stops at the list; --yes answers).
Things to know before you use it:
currentworks within a patch range; below 1.0.0 it also crosses newer minors, so a lock at 0.34.1 moves to 0.36.0.rafa self-updateis a different command: it moves the rafa every project on the device runs, from a checkout of rafa's repository (rafa self-update).
In the target layout's cut table this code counts toward the command-line package, @open-tomato/rafa, at the root of the repository, which is where it lives in 0.47.0 too (Repository layout). [verify: its final placement]
Actions
| Action | Does |
|---|---|
current | bring this project to the installed rafa: a newer patch, or any newer minor below 1.0.0 |
self | update rafa itself, from npm, a pinned version or another source (in development, #715) |
project | move this project to a version, with its migrations (in development, #716) |
board | apply the board's newest setup and its migrations (in development, #717) |
next | move this project to the newest minor of its major (in development, #716) |
latest | move this project to the newest version (in development, #716) |
rafa update current
Bring this project to the installed rafa: a newer patch, or any newer minor below 1.0.0.
rafa update current [--dry-run] [--yes]
Brings the project to the installed rafa when the installed version shares the major and minor of the version rafa.lock records at the project root, and is the same patch or newer; below 1.0.0 it also crosses newer minors, as 0.34.1 to 0.36.0. A project with no lock is adopted at the installed version. It creates the missing .rafa/ folders and the missing board labels on a GitHub board, runs the deprecations step (none registered yet), and writes rafa.lock. It prints every change first; --dry-run stops there. Otherwise it warns that the changes cannot be rolled back and asks once, --yes answering; with no terminal and no --yes it refuses with exit code 1. A newer minor from 1.0.0 on, a newer major, or an installed rafa older than the lock, refuses with exit code 1, and so does a board label gh would not create, once everything else is applied. A lock or config that cannot be read, or a .rafa/ path holding something else, exits 2 before anything is asked; a folder or the lock that cannot be written exits 2 naming the step and what was already written. In a linked worktree the lock is the worktree's, on its branch. With --output=json the plan and what was applied are the data of the terminal result event.
| Flag | Type and default | What it does |
|---|---|---|
--dry-run | boolean | Print every change and write nothing. |
--yes | boolean | Apply the changes without asking. |
Examples:
rafa update current --dry-run: Lists the folders, labels and lock it would write, and writes nothing.rafa update current --yes: Applies them without asking, as a script or a loop host runs it.
Output formats: text, json.
rafa update self
Update rafa itself, from npm, a pinned version or another source (in development, #715).
rafa update self
update rafa itself, from npm, a pinned version or another source. In development: it refuses with exit code 1, naming #715, and changes nothing.
Examples:
rafa update self: Refuses, naming #715; changes nothing.
Output formats: text, json.
rafa update project
Move this project to a version, with its migrations (in development, #716).
rafa update project
move this project to a version, with its migrations. In development: it refuses with exit code 1, naming #716, and changes nothing.
Examples:
rafa update project: Refuses, naming #716; changes nothing.
Output formats: text, json.
rafa update board
Apply the board's newest setup and its migrations (in development, #717).
rafa update board
apply the board's newest setup and its migrations. In development: it refuses with exit code 1, naming #717, and changes nothing.
Examples:
rafa update board: Refuses, naming #717; changes nothing.
Output formats: text, json.
rafa update next
Move this project to the newest minor of its major (in development, #716).
rafa update next
move this project to the newest minor of its major. In development: it refuses with exit code 1, naming #716, and changes nothing.
Examples:
rafa update next: Refuses, naming #716; changes nothing.
Output formats: text, json.
rafa update latest
Move this project to the newest version (in development, #716).
rafa update latest
move this project to the newest version. In development: it refuses with exit code 1, naming #716, and changes nothing.
Examples:
rafa update latest: Refuses, naming #716; changes nothing.
Output formats: text, json.