aboutsummaryrefslogtreecommitdiff
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* feat: consolidate zfssnapshot and zfsrollback into one subcommand-driven scriptCraig Jennings2026-04-271-1/+1
| | | | | | | | | | | | Problem: zfssnapshot and zfsrollback were two separate scripts with overlapping pre-flight checks (zfs / fzf / root) and parallel UX patterns (description sanitization in one, fzf selection in the other). Users had to remember which script was for which operation, and a "list" view meant typing the raw `zfs list -t snapshot` command. There was no path to destroy individual snapshots short of `zfs destroy` directly, which is dangerous without a confirmation flow. Solution: rewrite zfssnapshot as a single multi-subcommand script (list, create, rollback, delete). Drop installer/zfsrollback. The new script uses a source-guard at the bottom (`if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then main "$@"; fi`) so bats can source it without triggering the install-time pre-flight checks, matching the pattern in installer/archangel. Pure helpers (sanitize_description, validate_description, format_snapshot_name) get extracted as named functions so they're testable in isolation. The destructive flows (rollback, delete) keep the explicit "yes" confirmation prompt, the genesis-snapshot warning, and the recursive-rollback-destroys-newer-snapshots warning. Delete uses fzf --multi so the user can pick several snapshot names at once. Updated build.sh to copy only the consolidated script. Dropped the zfsrollback profiledef permission line. Updated Makefile, README, scripts/sanity-test.sh, and testing-strategy.org to reflect the single-script layout. Bats: 147 → 168 (+21). Coverage spans sanitize_description (normal / boundary / error), validate_description (alphanumerics, hyphens, underscores accepted; spaces, slashes, shell metacharacters, empty rejected), format_snapshot_name (timestamp + description composition), and main subcommand dispatch (list / create / rollback / delete / help / unknown). Lint clean. The zfs-, fzf-, and arch-chroot-shelling subcommand bodies stay VM-tested per testing-strategy.org.
* fix: don't mask test-install exit codes through teeCraig Jennings2026-04-211-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | The Makefile let failures slip through silently when the caller piped output: `make test-install 2>&1 | tee log` returned 0 even when the inner build or VM run failed, because tee's zero exit masked the pipeline. This happened today during an ISO rebuild — the first attempt failed on corrupted pacman cache but the task notification reported exit 0. Two changes: 1. Set the recipe shell flags to enable pipefail (`SHELL := /bin/bash` + `.SHELLFLAGS := -o pipefail -c`). Any intra-recipe pipeline now propagates the first non-zero exit instead of the last. Safe to add — no existing recipe uses intra-recipe pipes today. 2. Bake tee into the test-install recipe itself. Output writes to `test-logs/make-test-install-YYYY-MM-DD-HHMM.log` so callers never need to pipe through tee externally. With SHELLFLAGS pipefail in place, the test script's exit code propagates through the baked-in tee back to the caller cleanly. Verified with a repro: a recipe shaped like `failing-cmd | tee log` returns non-zero; the 71-test bats suite still passes.
* test: add bats unit tests for common.sh and config.shCraig Jennings2026-04-121-4/+12
| | | | | | | | 23 bats tests covering the pure logic in installer/lib/common.sh (command_exists, require_command, info/warn/error, enable_color, require_root, log) and installer/lib/config.sh (parse_args, load_config, validate_config, check_config). Makefile adds a 'bats' target; 'test' now runs lint + bats (VM integration tests remain under test-install).
* refactor: rename vm-* Makefile targets to test-* for discoverabilityCraig Jennings2026-02-241-11/+11
|
* feat: add Makefile targets for manual VM testingCraig Jennings2026-02-241-7/+40
| | | | | Add vm, vm-multi, vm-multi3, vm-boot, and vm-clean targets. Update README to reference make targets instead of raw script invocations.
* chore: remove default Makefile target, update README overviewCraig Jennings2026-02-231-5/+1
|
* refactor: rename custom/ to installer/ for clarityCraig Jennings2026-02-231-1/+1
| | | | | | | | The custom/ directory name was an archiso implementation detail. Renamed to installer/ which clearly communicates that this directory contains the installer scripts and utilities that ship on the ISO. Updated all references in build.sh, Makefile, test-install.sh, and README.
* chore: standardize shebangs, fix lint target, add .editorconfigCraig Jennings2026-02-231-1/+1
| | | | | | | - Change all script shebangs to #!/usr/bin/env bash for portability (heredocs writing to installed systems keep #!/bin/bash) - Remove || true from Makefile lint target so shellcheck errors fail the build - Add .editorconfig for consistent formatting across editors
* remove skeleton archsetup-zfs scriptCraig Jennings2026-02-221-1/+1
| | | | | Non-functional stub that printed "this is a skeleton" — worse than not having it. Removed from build.sh, Makefile, and file permissions.
* refactor: rename archzfs to archangel, simplify build-releaseCraig Jennings2026-01-311-4/+4
| | | | | | | | - Standardize naming: VM names, hostname, passwords, ISO naming - Remove USB, Ventoy, and local deployment from build-release - Add snapper package and Btrfs validation tests to sanity-test - Update README for dual ZFS/Btrfs architecture - Delete obsolete SESSION-CONTEXT.md and download-archzfs-iso.sh
* fix: remove obsolete test for deleted zfs-snap-pruneCraig Jennings2026-01-261-14/+8
| | | | | | - Remove test-zfs-snap-prune.sh (tested deleted script) - Update Makefile to reference existing custom/ scripts - Remove test-unit target (no unit tests remain)
* chore: remove redundant help targetCraig Jennings2026-01-261-15/+1
| | | | Usage info already documented in header comment.
* Add CI/CD test infrastructureCraig Jennings2026-01-181-0/+79
- Add Makefile with targets: all, test, test-unit, test-install, build, release, clean, lint - Add test-install.sh for automated VM installation testing - Add test configs: single-disk, mirror, raidz1, no-ssh, custom-locale - Add test-logs/ to .gitignore - Uses sshpass for SSH authentication to live ISO - Copies latest install-archzfs to VM before testing (allows testing without rebuild) - Supports --list to show available configs