Commit Graph
3 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 101261bd9b update: a failing hook without run_update fails the update
shellcheck / shellcheck (push) Failing after 17s
Since a65f07c ran each hook in a subshell, a hook that does its work as
it's sourced (12-migrations, 15-services, 20-aur, 30-flatpak and others)
had its failure lost: the run_update check after source left the
subshell's status at 0, so update said "Done." and exited 0. The smoketest's
40-failing-migration caught it. update now exits the subshell with the
sourced hook's status.

Also, the smoketest scenarios that check whether a migration ran look for
"Running migration " so install.sh's "Running migrations..." heading
doesn't match (11-refresh failed on it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:39:54 -07:00
davidandClaude Opus 5.5 c6a6bac84a Merge branch 'main' of https://gitea.federated.computer/Federated_Computer/coredesktop
shellcheck / shellcheck (push) Successful in 13s
Brings in the shellcheck lint and bats tests. Both sides fixed the same
shellcheck warnings; this keeps the remote's versions of 20-aur.sh,
80-gnome-extensions.sh and .shellcheckrc, which silence false positives
per line rather than for the whole repo.

The Gitea workflow now runs make lint, so it checks the same scripts as
the Makefile, and the README points contributors at make check. The test
helper's REPO, used only by the .bats files, is marked for shellcheck,
and the update test expects the pull to be fast-forward only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 07:25:07 -06:00
davidandClaude Opus 5.5 d9da8208dd Add shellcheck lint and bats tests
make lint runs shellcheck on every tracked bash script, make test runs
the bats suite in tests/, and make check runs both. The tests cover the
update orchestrator (hook isolation, failure reporting, pull and
free-space handling) and utils.sh (migrations, package install and
removal, services, initramfs build check), using stub commands so they
never touch the real system.

Fixes from the first lint run: 20-aur.sh stops if a cd fails rather
than building or deleting in the wrong directory, and
80-gnome-extensions.sh refuses to rm -rf with an empty path. The rest
are false positives, silenced in .shellcheckrc or per line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 16:15:12 -06:00