Check packages upstream, test hampackcheck and the conf files, add CI
`hampackcheck packages` (and `make check-packages`) checks that every package in packages.conf is in the repos or on the AUR and every Flatpak is on Flathub, and fails if any is missing or couldn't be checked. Names only provided by another package pass with a note. New tests cover hampackcheck's version comparisons and package check, and check compile.conf, binaries.conf, packages.conf and the desktop files for missing or misspelt fields and paths that don't exist. A Gitea workflow runs lint and tests on every push and pull request, and the package check on those and weekly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bb5c7900d5
commit
8023b04024
@@ -76,8 +76,11 @@ There's no reason why someone couldn't collaborate on HamPack and "port" it to o
|
||||
HamPack is a set of Bash scripts. `install.sh` runs once, from `sibling add`; `update.sh` runs on every `update` and does the actual installing, so every step must work both on a fresh machine and on one that already has everything. Shared functions are in `lib.sh`.
|
||||
|
||||
- `make lint` runs shellcheck on every script
|
||||
- `make test` runs the bats tests in `tests/`, which stub out sudo, pacman, Flatpak and systemd, so they're safe to run
|
||||
- `make hooks` runs both before each commit
|
||||
- `make test` runs the bats tests in `tests/`, which stub out sudo, pacman, Flatpak and systemd, so they're safe to run. They also check the conf files for missing or misspelt fields
|
||||
- `make check-packages` checks that every package in `packages.conf` is in the Arch repos or the AUR, and every Flatpak is on Flathub (run `sudo pacman -Sy` first). It catches packages that were renamed or dropped upstream, but not a typo that happens to be another package's name
|
||||
- `make hooks` runs `make lint test` before each commit
|
||||
|
||||
Gitea runs `make lint test` on every push and pull request, and `make check-packages` on those and once a week, since packages can disappear upstream without any change here (`.gitea/workflows/check.yml`).
|
||||
|
||||
To add an application, add a section to `binaries.conf` or `compile.conf`; the comments at the top of each describe the fields.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user