Skip to content

Commit f79e660

Browse files
update make_release to include module version number
1 parent 89346e1 commit f79e660

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

scripts.sh

+9-5
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,30 @@ cp_bin() {
8181
}
8282

8383
make_release() {
84-
printf "${BLUE}Making release for version ${NGINX_VERSION}...${NC}\n"
84+
local moduleVersion=${1}
85+
local nginxVersion=${2}
86+
87+
printf "${BLUE}Making release for version ${moduleVersion} for NGINX ${nginxVersion}...${NC}\n"
8588

8689
build_module
8790
cp_bin
8891

8992
mkdir -p release
90-
tar -czvf release/ngx_http_auth_jwt_module_${NGINX_VERSION}.tgz \
93+
tar -czvf release/ngx_http_auth_jwt_module_${moduleVersion}_nginx_${nginxVersion}.tgz \
9194
README.md \
9295
-C bin/usr/lib64/nginx/modules ngx_http_auth_jwt_module.so > /dev/null
9396
}
9497

9598
# Create releases for the current mainline and stable version, as well as the 2 most recent "legacy" versions.
9699
# See: https://nginx.org/en/download.html
97100
make_releases() {
98-
VERSIONS=(1.20.2 1.22.1 1.24.0 1.23.4)
101+
local moduleVersion=$(git describe --tags --abbrev=0)
102+
local nginxVersions=(1.20.2 1.22.1 1.24.0 1.23.4)
99103

100104
rm -rf release/*
101105

102-
for v in ${VERSIONS[@]}; do
103-
NGINX_VERSION=${v} make_release
106+
for v in ${nginxVersions[@]}; do
107+
make_release ${moduleVersion} ${v}
104108
done
105109
}
106110

0 commit comments

Comments
 (0)