CI: ssl: add git id support for wolfssl download

Allow to download a git revision directly with the git ID.

WOLFSSL_VERSION=git-d83f2fa ./scripts/build-ssl.sh
This commit is contained in:
William Lallemand 2023-10-10 00:26:46 +02:00
parent cfd72eb65f
commit 0be50f44f8

View File

@ -125,16 +125,22 @@ download_quictls () {
download_wolfssl () {
if [ ! -f "download-cache/wolfssl-${WOLFSSL_VERSION}.tar.gz" ]; then
mkdir -p download-cache
if [ "${WOLFSSL_VERSION%%-*}" != "git" ]; then
wget -q -O "download-cache/wolfssl-${WOLFSSL_VERSION}.tar.gz" \
"https://github.com/wolfSSL/wolfssl/archive/refs/tags/v${WOLFSSL_VERSION}-stable.tar.gz"
"https://github.com/wolfSSL/wolfssl/archive/refs/tags/v${WOLFSSL_VERSION}-stable.tar.gz"
else
wget -q -O "download-cache/wolfssl-${WOLFSSL_VERSION}.tar.gz" \
"https://github.com/wolfSSL/wolfssl/archive/${WOLFSSL_VERSION##git-}.tar.gz"
fi
fi
}
build_wolfssl () {
if [ "$(cat ${HOME}/opt/.wolfssl-version)" != "${WOLFSSL_VERSION}" ]; then
tar zxf "download-cache/wolfssl-${WOLFSSL_VERSION}.tar.gz"
mkdir "wolfssl-${WOLFSSL_VERSION}/"
tar zxf "download-cache/wolfssl-${WOLFSSL_VERSION}.tar.gz" -C "wolfssl-${WOLFSSL_VERSION}/" --strip-components=1
(
cd "wolfssl-${WOLFSSL_VERSION}-stable/"
cd "wolfssl-${WOLFSSL_VERSION}/"
autoreconf -i
./configure --enable-haproxy --enable-quic --prefix="${HOME}/opt"
make -j$(nproc)