Files
wekan/tests
Lauri Ojansivu 74a8f931f1 Twelve one-line wrappers become menu commands, and both menus get a CLI.
The wrappers first. `releases/ufw-enable.sh` was one line - `sudo ufw enable` -
and so were eleven others: ssh-start/stop, snapd-start/stop, docker-start/stop,
multipass-remove, syncloop, git-add-revert, stable-tag and ufw-disable. Nothing
in the repository called them except the menus added yesterday, so they are the
command itself now, in the same menu entries. Checked one by one before
deleting: docker-build-deps.sh looked like the same kind of thing and is NOT
gone, because releases/docker-build.sh runs it.

An entry is "Group|Label|what|prompt|platform|key" now. `what` is a path under
releases/ or, with a leading "!", the command. `platform` is "linux" for the ten
that are systemd, ufw, snap or multipass: build.bat does not offer those,
because Windows cannot do them at all - it is not a parity gap, and the guard
knows the difference. ssh-start ran `systemctl enable ssh` twice; the entry
enables AND starts it, like its stop counterpart always did.

Then the CLI, which is what makes any of this usable from a script or a cron
entry:

  ./build.sh --help                   usage and examples
  ./build.sh --list                   all 84 names, with what each one does
  ./build.sh <name> [arguments]       run one, without the menu

  ./build.sh release-snap 10.50
  ./build.sh push-translation ja
  ./build.sh ufw-enable               what releases/ufw-enable.sh used to do

The name is the file name without its extension, or - for the twelve commands -
the name of the wrapper file it replaced, so anything anybody had in a script
keeps working. Arguments after the name are passed through unchanged. An
unknown name says so and exits 2 instead of doing nothing. build.bat has the
same thing, dispatched before the menu, and both menus have a "CLI commands"
entry that prints the help and the list.

tests/buildScriptParity.test.cjs gains: both scripts must dispatch from the
command line, every name build.sh answers to must work in build.bat unless it
is linux-only, the linux-only ones must NOT be in build.bat, and every example
in the help text must be a real name - which is the guard that catches a help
text teaching a command that fails.

Thanks to xet7 !
2026-07-29 04:04:47 +03:00
..
2026-06-18 04:14:59 +03:00
2026-05-27 20:51:44 +03:00
2026-05-27 20:51:44 +03:00