From 24e334b8f3a8121f665322cd90cd05965874ed07 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Wed, 5 Apr 2023 15:55:28 +0200 Subject: [PATCH] tools: fix update-openssl.yml compare version PR-URL: https://github.com/nodejs/node/pull/47384 Refs: https://github.com/nodejs/node/pull/46957 Reviewed-By: Rafael Gonzaga Reviewed-By: Richard Lau Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca --- .github/workflows/update-openssl.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-openssl.yml b/.github/workflows/update-openssl.yml index c2f919c60f6dcb..f79ea550b42818 100644 --- a/.github/workflows/update-openssl.yml +++ b/.github/workflows/update-openssl.yml @@ -28,7 +28,8 @@ jobs: NEW_VERSION=$(gh api repos/quictls/openssl/releases -q '.[].tag_name|select(contains("openssl-3"))|ltrimstr("openssl-")' | head -n1) NEW_VERSION_NO_RELEASE_1=$(case $NEW_VERSION in *quic1) echo ${NEW_VERSION%1};; *) echo $NEW_VERSION;; esac) VERSION_H="./deps/openssl/config/archs/linux-x86_64/asm/include/openssl/opensslv.h" - CURRENT_VERSION=$(grep "OPENSSL_FULL_VERSION_STR" $VERSION_H | sed -n "s/^.*VERSION_STR \"\(.*\)\"/\1/p") + CURRENT_VERSION=$(grep "OPENSSL_FULL_VERSION_STR" $VERSION_H | sed -n "s/^.*VERSION_STR \"\(.*\)\"/\1/p" | sed 's/+/-/g') + echo "comparing current version: $CURRENT_VERSION with $NEW_VERSION_NO_RELEASE_1" if [ "$NEW_VERSION_NO_RELEASE_1" != "$CURRENT_VERSION" ]; then echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV echo "HAS_UPDATE=true" >> $GITHUB_ENV