Skip to content

Commit

Permalink
update make_release to include module version number
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMcCullough committed Apr 26, 2023
1 parent 89346e1 commit f79e660
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,30 @@ cp_bin() {
}

make_release() {
printf "${BLUE}Making release for version ${NGINX_VERSION}...${NC}\n"
local moduleVersion=${1}
local nginxVersion=${2}

printf "${BLUE}Making release for version ${moduleVersion} for NGINX ${nginxVersion}...${NC}\n"

build_module
cp_bin

mkdir -p release
tar -czvf release/ngx_http_auth_jwt_module_${NGINX_VERSION}.tgz \
tar -czvf release/ngx_http_auth_jwt_module_${moduleVersion}_nginx_${nginxVersion}.tgz \
README.md \
-C bin/usr/lib64/nginx/modules ngx_http_auth_jwt_module.so > /dev/null
}

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

rm -rf release/*

for v in ${VERSIONS[@]}; do
NGINX_VERSION=${v} make_release
for v in ${nginxVersions[@]}; do
make_release ${moduleVersion} ${v}
done
}

Expand Down

0 comments on commit f79e660

Please sign in to comment.