CI: Use $ID instead of $NAME to identify the distribution
See https://src.fedoraproject.org/rpms/fedora-release/pull-request/402 NAME is defined as a presentation field, not an ID field, see https://www.mankier.com/5/os-release
This commit is contained in:
parent
51a3620fd2
commit
1769a6ec0e
8
plan.fmf
8
plan.fmf
@ -6,10 +6,10 @@ discover:
|
||||
tests:
|
||||
- name: c9s_mockbuild
|
||||
path: /
|
||||
test: NAME="CentOS Stream" VERSION_ID=9 tests/mocktest.sh pyproject-rpm-macros
|
||||
test: ID=centos VERSION_ID=9 tests/mocktest.sh pyproject-rpm-macros
|
||||
- name: c10s_mockbuild
|
||||
path: /
|
||||
test: NAME="CentOS Stream" VERSION_ID=10 tests/mocktest.sh pyproject-rpm-macros
|
||||
test: ID=centos VERSION_ID=10 tests/mocktest.sh pyproject-rpm-macros
|
||||
- name: pytest
|
||||
path: /tests
|
||||
test: ./mocktest.sh python-pytest
|
||||
@ -111,10 +111,10 @@ discover:
|
||||
test: ./mocktest.sh config-settings-test
|
||||
- name: isort_c9s
|
||||
path: /tests
|
||||
test: NAME="CentOS Stream" VERSION_ID=9 ./mocktest.sh python-isort
|
||||
test: ID=centos VERSION_ID=9 ./mocktest.sh python-isort
|
||||
- name: isort_c10s
|
||||
path: /tests
|
||||
test: NAME="CentOS Stream" VERSION_ID=10 ./mocktest.sh python-isort
|
||||
test: ID=centos VERSION_ID=10 ./mocktest.sh python-isort
|
||||
prepare:
|
||||
- name: Install dependencies
|
||||
how: install
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
#!/usr/bin/bash -eux
|
||||
if [ -z "${VERSION_ID-}" ] && [ -z "${NAME-}" ]; then
|
||||
if [ -z "${VERSION_ID-}" ] && [ -z "${ID-}" ]; then
|
||||
. /etc/os-release
|
||||
fi
|
||||
|
||||
version=$(echo "${VERSION_ID}" | cut -d. -f1)
|
||||
arch=$(rpm --eval '%{_arch}')
|
||||
|
||||
case $NAME in
|
||||
"Fedora Linux"|"Fedora")
|
||||
if [ "${VARIANT_ID-}" == "eln" ]; then
|
||||
case $ID in
|
||||
"fedora")
|
||||
if [ "${VARIANT_ID-}" == "eln" ]; then
|
||||
version="eln"
|
||||
fi
|
||||
mock="fedora-${version}-${arch}"
|
||||
repos="local"
|
||||
;;
|
||||
|
||||
"CentOS Stream"|"Red Hat Enterprise Linux")
|
||||
"centos"|"rhel")
|
||||
case $version in
|
||||
9)
|
||||
mock="centos-stream+epel-next-${version}-${arch}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user