Alejandra'd repo, added better dry run script.
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m32s
All checks were successful
Build Nix modules (dry-run) / build-modules (push) Successful in 3m32s
This commit is contained in:
parent
32cf42d11d
commit
387fb668b3
11 changed files with 101 additions and 64 deletions
39
dry_run.zsh
39
dry_run.zsh
|
|
@ -21,8 +21,43 @@ if [[ -n "$1" ]]; then
|
|||
configs=("$1")
|
||||
fi
|
||||
|
||||
# Track results
|
||||
passed_configs=()
|
||||
failed_configs=()
|
||||
|
||||
for config in "${configs[@]}"; do
|
||||
echo "=== Dry-run: $config ==="
|
||||
nix build --dry-run ".#nixosConfigurations.${config}.config.system.build.toplevel" || true
|
||||
echo "Dry-run: $config ==="
|
||||
if nix build --dry-run ".#nixosConfigurations.${config}.config.system.build.toplevel" 2>&1; then
|
||||
echo "[PASSED]: $config"
|
||||
passed_configs+=("$config")
|
||||
else
|
||||
echo "[FAILED]: $config"
|
||||
failed_configs+=("$config")
|
||||
fi
|
||||
echo
|
||||
done
|
||||
|
||||
# Print summary
|
||||
echo "BUILD SUMMARY"
|
||||
echo "Total: ${#configs[@]} | Passed: ${#passed_configs[@]} | Failed: ${#failed_configs[@]}"
|
||||
echo
|
||||
|
||||
if [[ ${#passed_configs[@]} -gt 0 ]]; then
|
||||
echo "Passed configs:"
|
||||
for c in "${passed_configs[@]}"; do
|
||||
echo " - $c"
|
||||
done
|
||||
echo
|
||||
fi
|
||||
|
||||
if [[ ${#failed_configs[@]} -gt 0 ]]; then
|
||||
echo "Failed configs:"
|
||||
for c in "${failed_configs[@]}"; do
|
||||
echo " - $c"
|
||||
done
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "All configurations passed!"
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue