Skip to content

Commit

Permalink
fix(ci): Include Linux distro version in RPM's artifact name
Browse files Browse the repository at this point in the history
This is a minor follow-up fix to 669533c.

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.
  • Loading branch information
guihkx committed Sep 30, 2024
1 parent d2455cf commit 1e06fd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfiles/rpm_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1e06fd0

Please sign in to comment.