From 1e06fd064b47757c05fab95665ae7d4169888f99 Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:17:57 -0300 Subject: [PATCH] fix(ci): Include Linux distro version in RPM's artifact name This is a minor follow-up fix to 669533c22c0045e7bfcb7a8f540ebf8e4d26c935. After that commit, build artifacts for Fedora and openSUSE lacked the distro version at the end of their file names, i.e.: - "notes-2.3.0-1.x86_64-qt6-fedora-38" wrongly became: "notes-2.3.0-1.x86_64-qt6-fedora" - "notes-2.3.0-1.x86_64-qt6-opensuse-leap-15.5" wrongly became: "notes-2.3.0-1.x86_64-qt6-opensuse-leap" This change now includes the version as well. --- Dockerfiles/rpm_entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfiles/rpm_entrypoint.sh b/Dockerfiles/rpm_entrypoint.sh index 9fc16634..7c3a057e 100755 --- a/Dockerfiles/rpm_entrypoint.sh +++ b/Dockerfiles/rpm_entrypoint.sh @@ -86,8 +86,8 @@ rpmlint "${BUILD_DIR}"/*.rpm if [ -f /GITHUB_OUTPUT ]; then msg "Note: File '/GITHUB_OUTPUT' exists, assuming we're running on GitHub Actions." distro_id=$(grep -oPm1 '^ID="?\K[^"]+' /etc/os-release) - distro_codename=$(grep -oPm1 '^VERSION_CODENAME="?\K[^"]+' /etc/os-release || echo '') - echo "distro_name=${distro_id}${distro_codename:+-"$distro_codename"}" >>'/GITHUB_OUTPUT' + version_id=$(grep -oPm1 '^VERSION_ID="?\K[^"]+' /etc/os-release || echo '') + echo "distro_name=${distro_id}${version_id:+-"$version_id"}" >>'/GITHUB_OUTPUT' if ! rpm_path=$(find "${BUILD_DIR}" -maxdepth 1 -name '*.rpm' -print -quit); then msg 'Fatal: Unable to find rpm package'