Skip to content

Commit 738605c

Browse files
committed
Fix distribution and version split
1 parent b23f06f commit 738605c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/package_linux.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,17 @@ jobs:
114114
ID: ${{ matrix.id }}
115115
run: |
116116
set -x
117-
# Example: almalinux-8-amd64 -> almalinux
118-
distribution="${ID%-*-*}"
117+
case "${ID}" in
118+
centos-*)
119+
# Example: centos-9-stream-amd64 -> centos
120+
distribution="${ID%%-*}"
121+
;;
122+
*)
123+
# Example: almalinux-8-amd64 -> almalinux
124+
# Example: amazon-linux-2023-amd64 -> amazon-linux
125+
distribution="${ID%-*-*}"
126+
;;
127+
esac
119128
echo "DISTRIBUTION=${distribution}" >> "${GITHUB_ENV}"
120129
# Example: almalinux-8-amd64 -> amd64
121130
architecture="${ID##*-}"
@@ -232,10 +241,12 @@ jobs:
232241
"${DISTRIBUTION}/pool/${code_name}/a/apache-arrow-apt-source/*.deb \
233242
"${DISTRIBUTION}/apache-arrow-apt-source-latest-${code_name}.deb"
234243
else
244+
# Example: centos-9-stream-amd64 -> centos-9-stream
235245
# Example: amazon-linux-2023-amd64 -> amazon-linux-2023
236246
version="${ID%-*}"
247+
# Example: centos-9-stream -> 9-stream
237248
# Example: amazon-linux-2023 -> 2023
238-
version="${version##*-}"
249+
version="${version##${DISTRIBUTION}-}"
239250
# Create
240251
# https://packages.apache.org/artifactory/arrow/${DISTRIBUTION}/${version}/apache-arrow-release-latest.rpm
241252
# for easy to install.

0 commit comments

Comments
 (0)