Skip to content

Commit da1c7ce

Browse files
update scripts.sh to add release-related functions
1 parent b2ec2bb commit da1c7ce

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
.vscode
33
bin
4+
release

scripts.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,31 @@ cp_bin() {
8080
fi
8181
}
8282

83+
make_release() {
84+
printf "${BLUE}Making release for version ${NGINX_VERSION}...${NC}\n"
85+
86+
build_module
87+
cp_bin
88+
89+
mkdir -p release
90+
tar -czvf release/ngx_http_auth_jwt_module_${NGINX_VERSION}.tgz \
91+
README.md \
92+
-C bin/usr/lib64/nginx/modules ngx_http_auth_jwt_module.so > /dev/null
93+
}
94+
95+
# Create releases for the current mainline and stable version, as well as the 2 most recent "legacy" versions.
96+
# See: https://nginx.org/en/download.html
97+
make_releases() {
98+
VERSIONS=(1.20.2 1.22.1 1.24.0 1.23.4)
99+
100+
rm -rf release/*
101+
102+
for v in ${VERSIONS[@]}; do
103+
NGINX_VERSION=${v} make_release
104+
done
105+
}
106+
107+
83108
build_test_runner() {
84109
local dockerArgs=${1:-}
85110
local configHash=$(get_hash $(find test -type f -not -name 'test.sh' -not -name '*.yml' -not -name 'Dockerfile*'))

0 commit comments

Comments
 (0)