Skip to content

Commit 30c55e7

Browse files
committed
fix(ci): use curl directly in manylinux glibc217 script
1 parent f744a14 commit 30c55e7

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

.github/scripts/package-client-cpp-manylinux-glibc217.sh

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,10 @@ esac
3737

3838
PACKAGE_CLASSIFIER="${PACKAGE_CLASSIFIER:-${DEFAULT_CLASSIFIER}}"
3939

40-
# manylinux2014 images ship curl but not wget (old CentOS7 path installed wget via yum).
41-
download() {
42-
local url="$1"
43-
local out="$2"
44-
if command -v curl >/dev/null 2>&1; then
45-
curl -fsSL -o "${out}" "${url}"
46-
elif command -v wget >/dev/null 2>&1; then
47-
wget -qL -O "${out}" "${url}"
48-
else
49-
echo "Need curl or wget to download: ${url}" >&2
50-
exit 1
51-
fi
52-
}
53-
5440
CMAKE_VERSION=3.28.4
5541
CMAKE_DIR="/opt/cmake-${CMAKE_VERSION}"
5642
if [[ ! -x "${CMAKE_DIR}/bin/cmake" ]]; then
57-
download "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-${CMAKE_PKG_ARCH}.tar.gz" /tmp/cmake.tar.gz
43+
curl -fsSL -o /tmp/cmake.tar.gz "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-${CMAKE_PKG_ARCH}.tar.gz"
5844
rm -rf "${CMAKE_DIR}"
5945
mkdir -p /opt
6046
tar xf /tmp/cmake.tar.gz -C /opt
@@ -63,7 +49,7 @@ fi
6349

6450
JAVA_HOME=/opt/jdk-17
6551
if [[ ! -x "${JAVA_HOME}/bin/java" ]]; then
66-
download "https://api.adoptium.net/v3/binary/latest/17/ga/${JDK_API_ARCH}/jdk/hotspot/normal/eclipse?project=jdk" /tmp/jdk17.tar.gz
52+
curl -fsSL -o /tmp/jdk17.tar.gz "https://api.adoptium.net/v3/binary/latest/17/ga/${JDK_API_ARCH}/jdk/hotspot/normal/eclipse?project=jdk"
6753
rm -rf /opt/jdk-17*
6854
mkdir -p /opt
6955
tar xf /tmp/jdk17.tar.gz -C /opt

0 commit comments

Comments
 (0)