Upgrade re2 from v1.17.7 to v1.20.1 (#162880)

This commit is contained in:
Thomas Watson 2023-08-04 20:13:13 +02:00 committed by GitHub
parent ac66353a39
commit 4c41247f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 65 additions and 35 deletions

39
scripts/download_re2.sh Executable file
View file

@ -0,0 +1,39 @@
#!/usr/bin/env bash
args=("$@")
re2_version=${args[0]}
if [ -z "$re2_version" ]; then
echo "Usage: ./download_re2.sh [re2_version]"
exit 1
fi
archs=(
"darwin-arm64"
"darwin-x64"
"linux-musl-x64"
"linux-x64"
"win32-x64"
)
node_api_versions=( 108 115 )
formats=( "br" "gz" )
echo "Downloading builds of re2 version ${re2_version} to /tmp/re2"
mkdir /tmp/re2
for node_api_version in "${node_api_versions[@]}"; do
echo " Node.js API version ${node_api_version}"
for arch in "${archs[@]}"; do
for format in "${formats[@]}"; do
url="https://github.com/uhop/node-re2/releases/download/${re2_version}/${arch}-${node_api_version}.${format}"
echo " ${url}"
(cd /tmp/re2 && curl -s -L -O "${url}")
done
done
done
echo
echo "Calculating shasums for downloaded artifacts..."
echo
shasum -a 256 /tmp/re2/*