Skip to content

Commit c7df7ea

Browse files
committed
Fixed build_module.sh to accept new NGINX Plus versioning
1 parent 8a479ee commit c7df7ea

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

build_module.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Obtains pkg-oss tool, creates packaging files and copies in module source.
1010
#
1111
# CHANGELOG
12+
# v0.20 [05-May-2026] Accept new versioning for NGINX Plus releases
1213
# v0.19 [03-Sep-2024] Moved to GitHub
1314
# v0.18 [29-Apr-2021] Added -V option to specify module version
1415
# v0.17 [11-Nov-2020] Fixed bashisms and made /bin/sh default interpreter
@@ -63,7 +64,7 @@ if [ $# -eq 0 ]; then
6364
echo " -s | --skip-depends # Skip dependecies check/install"
6465
echo " -y | --non-interactive # Automatically install dependencies and overwrite files"
6566
echo " -f | --force-dynamic # Attempt to convert static configuration to dynamic module"
66-
echo " -r <NGINX Plus release number> # Build against the corresponding OSS version for this release"
67+
echo " -r <NGINX Plus release number> # Build against the corresponding OSS version for this release (NN[pN] or NN.N[.N])"
6768
echo " -v [NGINX OSS version number] # Build against this OSS version [current mainline] (default)"
6869
echo " -o <package output directory> # Create package(s) in this directory (default: $OUTPUT_DIR)"
6970
echo ""
@@ -109,14 +110,15 @@ while [ $# -gt 1 ]; do
109110
;;
110111
"-r")
111112
BUILD_PLATFORM=Plus
112-
if [ `echo -n $2 | tr -d '[0-9p]' | wc -c` -gt 0 ]; then
113-
echo "$ME: ERROR: NGINX Plus release must be in the format NN[pN] - quitting"
113+
if [ `echo -n $2 | tr -d '[0-9p.]' | wc -c` -gt 0 ]; then
114+
echo "$ME: ERROR: NGINX Plus release must be in the format NN[pN] or NN.N[.N] - quitting"
114115
exit 1
115116
elif [ "`echo "10^$2" | tr '^' '\n' | sort -nr | head -1`" = "10" ]; then
116117
echo "$ME: ERROR: NGINX Plus release must be at least 11 to support dynamic modules - quitting"
117118
exit 1
118119
fi
119-
PLUS_REL=$2
120+
# Normalize NN.N.N to NN.N for git branch naming
121+
PLUS_REL=`echo $2 | sed 's/^\([0-9]*\.[0-9]*\)\.[0-9]*$/\1/'`
120122
shift; shift
121123
;;
122124
"-v")

0 commit comments

Comments
 (0)