From effe996239f49189778a266187c8fa3a3fdbd1af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 6 Dec 2023 13:46:49 +0100 Subject: [PATCH] fix(ci): fix OS version check in Ubuntu setup script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- scripts/ubuntu_build_setup.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/ubuntu_build_setup.sh b/scripts/ubuntu_build_setup.sh index 712ec1b06d..bdf566e1de 100755 --- a/scripts/ubuntu_build_setup.sh +++ b/scripts/ubuntu_build_setup.sh @@ -8,11 +8,8 @@ QT_INSTALL_DIR="/opt/qt" function check_version { source /etc/os-release - - if [[ "$NAME" != "Ubuntu" ]] || ! [[ "$VERSION" =~ ^20\.04 ]]; then - echo "ERROR: Ubuntu version is not 20.04.4" - exit 1 - fi + [[ "${NAME}" != "Ubuntu" ]] && { echo "ERROR: This script only supports Ubuntu!"; exit 1; } + [[ "${VERSION_ID}" != '22.04' ]] && { echo "ERROR: Ubuntu version not 22.04!"; exit 1; } } function install_build_dependencies { @@ -38,7 +35,7 @@ function install_release_dependencies { function install_runtime_dependencies { echo "Install runtime dependencies" - # xvfb is needed in order run squish test into a headless server + # xvfb is needed in order run squish test into a headless server apt install -yq libxcomposite-dev xvfb libxft-dev \ libxcb-shape0 libxcb-randr0 libxcb-render0 libxcb-icccm4 libxcb-image0 \ libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0