Skip to content

Commit 8bf5cce

Browse files
authored
Strip decimal from centos VERSION_ID
1 parent 9745249 commit 8bf5cce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/install-postgres.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ if [ "${ID}" = "debian" -o "${ID}" = "ubuntu" ]; then
2828
"postgresql-${PGVERSION}" \
2929
"postgresql-contrib-${PGVERSION}"
3030
elif [ "${ID}" = "centos" ]; then
31-
el="EL-${VERSION_ID}-$(arch)"
31+
el="EL-${VERSION_ID%.*}-$(arch)"
3232
baseurl="https://download.postgresql.org/pub/repos/yum/reporpms"
3333
yum install -y "${baseurl}/${el}/pgdg-redhat-repo-latest.noarch.rpm"
34-
if [ ${VERSION_ID} -ge 8 ]; then
34+
if [ ${VERSION_ID%.*} -ge 8 ]; then
3535
dnf -qy module disable postgresql
3636
fi
3737
yum install -y \

0 commit comments

Comments
 (0)