[build] Make the build to fail if raw image generation is not successful (#16461)

This commit is contained in:
Arun Saravanan Balachandran 2023-09-07 21:45:03 +05:30 committed by GitHub
parent d7b85af18b
commit d758e44c2c
No account linked to committer's email address

View File

@ -139,7 +139,11 @@ elif [ "$IMAGE_TYPE" = "raw" ]; then
## Run the installer ## Run the installer
## The 'build' install mode of the installer is used to generate this dump. ## The 'build' install mode of the installer is used to generate this dump.
sudo chmod a+x $tmp_output_onie_image sudo chmod a+x $tmp_output_onie_image
sudo ./$tmp_output_onie_image sudo ./$tmp_output_onie_image || {
## Failure during 'build' install mode of the installer results in an incomplete raw image.
## Delete the incomplete raw image.
sudo rm -f $OUTPUT_RAW_IMAGE
}
rm $tmp_output_onie_image rm $tmp_output_onie_image
[ -r $OUTPUT_RAW_IMAGE ] || { [ -r $OUTPUT_RAW_IMAGE ] || {