Skip to content

Commit

Permalink
feat: add lua_resty_events to apisix-runtime (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sn0rt authored Nov 17, 2023
1 parent ebc0017 commit 1dcdaeb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build-apisix-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ apisix_nginx_module_ver="1.15.0"
wasm_nginx_module_ver="0.6.5"
lua_var_nginx_module_ver="v0.5.3"
grpc_client_nginx_module_ver="v0.4.4"
lua_resty_events_ver="0.2.0"
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
debug_args=${debug_args:-}

Expand All @@ -26,6 +27,14 @@ cd "$workdir" || exit 1
wget --no-check-certificate https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz
tar -zxvpf openresty-${OPENRESTY_VERSION}.tar.gz > /dev/null

if [ "$repo" == lua-resty-events ]; then
cp -r "$prev_workdir" ./lua-resty-events-${lua_resty_events_ver}
else
git clone --depth=1 -b $lua_resty_events_ver \
https://github.com/Kong/lua-resty-events.git \
lua-resty-events-${lua_resty_events_ver}
fi

if [ "$repo" == ngx_multi_upstream_module ]; then
cp -r "$prev_workdir" ./ngx_multi_upstream_module-${ngx_multi_upstream_module_ver}
else
Expand Down Expand Up @@ -129,6 +138,7 @@ fi
--add-module=../wasm-nginx-module-${wasm_nginx_module_ver} \
--add-module=../lua-var-nginx-module-${lua_var_nginx_module_ver} \
--add-module=../grpc-client-nginx-module-${grpc_client_nginx_module_ver} \
--add-module=../lua-resty-events-${lua_resty_events_ver} \
--with-poll_module \
--with-pcre-jit \
--without-http_rds_json_module \
Expand Down Expand Up @@ -163,6 +173,13 @@ make -j`nproc`
sudo make install
cd ..

cd lua-resty-events-${lua_resty_events_ver} || exit 1
sudo install -d "$OR_PREFIX"/lualib/resty/events/
sudo install -m 664 lualib/resty/events/*.lua "$OR_PREFIX"/lualib/resty/events/
sudo install -d "$OR_PREFIX"/lualib/resty/events/compat/
sudo install -m 644 lualib/resty/events/compat/*.lua "$OR_PREFIX"/lualib/resty/events/compat/
cd ..

cd apisix-nginx-module-${apisix_nginx_module_ver} || exit 1
sudo OPENRESTY_PREFIX="$OR_PREFIX" make install
cd ..
Expand Down

0 comments on commit 1dcdaeb

Please sign in to comment.