Fix duplicate debian-bullseye in image name

This is due to usage of OS and DEBIAN in a CI.
Ignore DEBIAN/UBI if OS is specified.
This commit is contained in:
Kamil Trzciński 2022-10-28 13:08:27 +02:00
parent fcf4b14618
commit 5cbbafa65e

View file

@ -389,7 +389,14 @@ function build_custom_if_needed() {
printf "\n\nSUCCESS - Successfully built:\n\t%s\n" "$full_image_name"
}
# Use DEBIAN by default unless specified otherwise
DEBIAN=${DEBIAN:-bullseye}
# If OS is specified ignore other ways to specify system
# Use DEBIAN if UBI is not specified
if [[ -n "$OS" ]]; then
unset DEBIAN UBI
elif [[ -n "$UBI" ]]; then
unset DEBIAN
else
DEBIAN=${DEBIAN:-bullseye}
fi
build_custom_if_needed $@