ci: alert on failed input updates but continue updating other inputs
This commit is contained in:
parent
e05a5cd12f
commit
f2bd8ec6d4
9
bin/ci
9
bin/ci
@ -31,10 +31,11 @@ if [ "${1}" = "update" ]; then
|
||||
handle_co_fail
|
||||
exit 1
|
||||
fi
|
||||
if ! nix flake update --commit-lock-file; then
|
||||
handle_update_fail
|
||||
exit 1
|
||||
fi
|
||||
for inp in $(nix flake metadata --json | jq -r '.locks.nodes.root.inputs | keys[] as $k | $k'); do
|
||||
if ! nix flake lock --commit-lock-file --update-input "$inp"; then
|
||||
handle_update_fail $inp
|
||||
fi
|
||||
done
|
||||
if ! nix flake check --print-build-logs; then
|
||||
handle_update_check_fail
|
||||
exit 1
|
||||
|
@ -87,6 +87,10 @@ ci_error() {
|
||||
git checkout main
|
||||
}
|
||||
|
||||
_po() {
|
||||
po -title "$1" -body "$2"
|
||||
}
|
||||
|
||||
po_error() {
|
||||
po -title "$1" -body "$2"
|
||||
ci_error
|
||||
@ -122,7 +126,7 @@ handle_co_fail() {
|
||||
}
|
||||
|
||||
handle_update_fail() {
|
||||
po_error "CI: flake input update failed!" "$(get_journal xin-ci-update)"
|
||||
_po "CI: input '$1' update failed!" "$(get_journal xin-ci-update)"
|
||||
}
|
||||
|
||||
handle_check_fail() {
|
||||
|
Loading…
Reference in New Issue
Block a user