This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch release/2.10
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/release/2.10 by this push:
new f5e4539 backport: update luarocks version to 3.8.0 (#6637)
f5e4539 is described below
commit f5e45390b65a628bf74e3abd242798a53b63a035
Author: Yu.Bozhong <[email protected]>
AuthorDate: Thu Mar 17 14:05:30 2022 +0800
backport: update luarocks version to 3.8.0 (#6637)
---
utils/linux-install-luarocks.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/utils/linux-install-luarocks.sh b/utils/linux-install-luarocks.sh
index 6a6d6b4..8b6aad2 100755
--- a/utils/linux-install-luarocks.sh
+++ b/utils/linux-install-luarocks.sh
@@ -22,9 +22,11 @@ if [ -z ${OPENRESTY_PREFIX} ]; then
OPENRESTY_PREFIX="/usr/local/openresty"
fi
-wget https://github.com/luarocks/luarocks/archive/v3.4.0.tar.gz
-tar -xf v3.4.0.tar.gz
-cd luarocks-3.4.0 || exit
+LUAROCKS_VER=3.8.0
+wget https://github.com/luarocks/luarocks/archive/v"$LUAROCKS_VER".tar.gz
+tar -xf v"$LUAROCKS_VER".tar.gz
+rm -f v"$LUAROCKS_VER".tar.gz
+cd luarocks-"$LUAROCKS_VER" || exit
OR_BIN="$OPENRESTY_PREFIX/bin/openresty"
OR_VER=$($OR_BIN -v 2>&1 | awk -F '/' '{print $2}' | awk -F '.' '{print
$1"."$2}')
@@ -41,10 +43,11 @@ fi
make build > build.log 2>&1 || (cat build.log && exit 1)
sudo make install > build.log 2>&1 || (cat build.log && exit 1)
cd .. || exit
-rm -rf luarocks-3.4.0
mkdir ~/.luarocks || true
+rm -rf luarocks-"$LUAROCKS_VER"
+
# OpenResty 1.17.8 or higher version uses openssl111 as the openssl dirname.
OPENSSL_PREFIX=${OPENRESTY_PREFIX}/openssl
if [ -d ${OPENRESTY_PREFIX}/openssl111 ]; then