Stop if one of the build fails

Using process substitution doesn't handle errors.
Check that we have the expected build assets before we continue.
This commit is contained in:
Jean-François Roche 2022-12-12 11:26:35 +01:00
parent 36056317a6
commit 9900fd121e
No known key found for this signature in database
GPG key ID: D1D09DE169EA19A0

View file

@ -43,7 +43,10 @@ main() {
build_kexec_bundle "$tag" "$arch" "$tmp"
build_netboot_image "$tag" "$arch" "$tmp"
)
if [ ! "${#assets[@]}" -eq "3" ]; then
echo "Missing build asset"
exit 1
fi
for asset in "${assets[@]}"; do
pushd "$(dirname "$asset")"
sha256sum "$(basename "$asset")" >> "$TMP/sha256sums"