◐ Shell
clean mode source ↗

tools: switch back to official OpenSSL · nodejs/node@2569e56

Original file line numberDiff line numberDiff line change

@@ -11,10 +11,10 @@ cleanup() {

1111
1212

download() {

1313

LATEST_TAG_NAME="$("$NODE" --input-type=module <<'EOF'

14-

const res = await fetch('https://api.github.com/repos/quictls/openssl/git/matching-refs/tags/openssl-3.0');

14+

const res = await fetch('https://api.github.com/repos/openssl/openssl/git/matching-refs/tags/openssl-3.0');

1515

if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });

1616

const releases = await res.json()

17-

const latest = releases.findLast(({ ref }) => ref.includes('quic'));

17+

const latest = releases.at(-1);

1818

if(!latest) throw new Error(`Could not find latest release`);

1919

console.log(latest.ref.replace('refs/tags/',''));

2020

EOF

@@ -39,14 +39,14 @@ EOF

3939
4040

OPENSSL_TARBALL="openssl.tar.gz"

4141
42-

curl -sL -o "$OPENSSL_TARBALL" "https://api.github.com/repos/quictls/openssl/tarball/$LATEST_TAG_NAME"

42+

curl -sL -o "$OPENSSL_TARBALL" "https://api.github.com/repos/openssl/openssl/tarball/$LATEST_TAG_NAME"

4343
4444

log_and_verify_sha256sum "openssl" "$OPENSSL_TARBALL"

4545
4646

gzip -dc "$OPENSSL_TARBALL" | tar xf -

4747
4848

rm "$OPENSSL_TARBALL"

49-

mv quictls-openssl-* openssl

49+

mv openssl-openssl-* openssl

5050

echo "Replacing existing OpenSSL..."

5151

rm -rf "$DEPS_DIR/openssl/openssl"

5252

mv "$WORKSPACE/openssl" "$DEPS_DIR/openssl/"

@@ -56,7 +56,7 @@ EOF

5656

echo "Please git add openssl, and commit the new version:"

5757

echo ""

5858

echo "$ git add -A deps/openssl/openssl"

59-

echo "$ git commit -m \"deps: upgrade openssl sources to quictls/openssl-$NEW_VERSION\""

59+

echo "$ git commit -m \"deps: upgrade openssl sources to openssl/openssl-$NEW_VERSION\""

6060

echo ""

6161

# The last line of the script should always print the new version,

6262

# as we need to add it to $GITHUB_ENV variable.