Skip to content

Commit 3bb3d25

Browse files
authored
fix: only enable debug when the build type is latest (#32)
1 parent 0049c71 commit 3bb3d25

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

build-apisix-openresty.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ set -x
55
if [ $# -gt 0 ] && [ "$1" == "latest" ]; then
66
ngx_multi_upstream_module_ver=""
77
mod_dubbo_ver=""
8+
debug_args="--with-debug"
9+
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty/debug"}
810
else
911
ngx_multi_upstream_module_ver="-b 1.0.0"
1012
mod_dubbo_ver="-b 1.0.0"
13+
debug_args=
14+
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
1115
fi
1216

13-
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
14-
1517
workdir=$(mktemp -d)
1618
cd "$workdir" || exit 1
1719

@@ -29,14 +31,13 @@ cd ngx_multi_upstream_module || exit 1
2931
cd ..
3032

3133
cd apisix-nginx-module/patch || exit 1
32-
cp ~/git/apisix-nginx-module/patch/1.19.3/lua-resty-core-tlshandshake.patch 1.19.3/
33-
~/git/apisix-nginx-module/patch/patch.sh ../../openresty-1.19.3.1
34+
./patch.sh ../../openresty-1.19.3.1
3435
cd ../..
3536

3637
cd openresty-1.19.3.1 || exit 1
3738
./configure --prefix="$OR_PREFIX" \
3839
--add-module=../mod_dubbo --add-module=../ngx_multi_upstream_module \
39-
--with-debug \
40+
$debug_args \
4041
--with-poll_module \
4142
--with-pcre-jit \
4243
--without-http_rds_json_module \

0 commit comments

Comments
 (0)