44
55version=${version:- 0.0.0}
66
7+ OPENRESTY_VERSION=${OPENRESTY_VERSION:- 1.21.4.1}
8+ if [ " $OPENRESTY_VERSION " == " source" ] || [ " $OPENRESTY_VERSION " == " default" ]; then
9+ OPENRESTY_VERSION=" 1.21.4.1"
10+ fi
11+
712if ([ $# -gt 0 ] && [ " $1 " == " latest" ]) || [ " $version " == " latest" ]; then
813 ngx_multi_upstream_module_ver=" master"
914 mod_dubbo_ver=" master"
@@ -31,9 +36,8 @@ repo=$(basename "$prev_workdir")
3136workdir=$( mktemp -d)
3237cd " $workdir " || exit 1
3338
34- or_ver=" 1.21.4.1"
35- wget --no-check-certificate https://openresty.org/download/openresty-${or_ver} .tar.gz
36- tar -zxvpf openresty-${or_ver} .tar.gz > /dev/null
39+ wget --no-check-certificate https://openresty.org/download/openresty-${OPENRESTY_VERSION} .tar.gz
40+ tar -zxvpf openresty-${OPENRESTY_VERSION} .tar.gz > /dev/null
3741
3842if [ " $repo " == ngx_multi_upstream_module ]; then
3943 cp -r " $prev_workdir " ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
9296fi
9397
9498cd ngx_multi_upstream_module-${ngx_multi_upstream_module_ver} || exit 1
95- ./patch.sh ../openresty-${or_ver }
99+ ./patch.sh ../openresty-${OPENRESTY_VERSION }
96100cd ..
97101
98102cd apisix-nginx-module-${apisix_nginx_module_ver} /patch || exit 1
99- ./patch.sh ../../openresty-${or_ver }
103+ ./patch.sh ../../openresty-${OPENRESTY_VERSION }
100104cd ../..
101105
102106cd wasm-nginx-module-${wasm_nginx_module_ver} || exit 1
@@ -111,14 +115,16 @@ no_pool_patch=${no_pool_patch:-}
111115# version of grpc-client-nginx-module
112116grpc_engine_path=" -DNGX_GRPC_CLI_ENGINE_PATH=$OR_PREFIX /libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=$OR_PREFIX /libgrpc_engine.so"
113117
114- cd openresty-${or_ver } || exit 1
118+ cd openresty-${OPENRESTY_VERSION } || exit 1
115119
120+ if [[ " $OPENRESTY_VERSION " == 1.21.4.1 ]] || [[ " $OPENRESTY_VERSION " == 1.19.* ]]; then
116121# FIXME: remove this once 1.21.4.2 is released
117122rm -rf bundle/LuaJIT-2.1-20220411
118123lj_ver=2.1-20230119
119124wget " https://github.com/openresty/luajit2/archive/v$lj_ver .tar.gz" -O " LuaJIT-$lj_ver .tar.gz"
120125tar -xzf LuaJIT-$lj_ver .tar.gz
121126mv luajit2-* bundle/LuaJIT-2.1-20220411
127+ fi
122128
123129or_limit_ver=0.08
124130if [ ! -d " bundle/lua-resty-limit-traffic-$or_limit_ver " ]; then
0 commit comments