mirror of
https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker.git
synced 2025-09-01 18:19:55 +00:00
[GHA] Add Build Number Tracker
This commit is contained in:
parent
5f0f19316a
commit
164e3603d3
4 changed files with 44 additions and 19 deletions
11
.github/workflows/action.yml
vendored
11
.github/workflows/action.yml
vendored
|
@ -74,10 +74,9 @@ jobs:
|
|||
./dev-tools/install-nginx-3.sh
|
||||
./dev-tools/test-nginx-3.sh
|
||||
|
||||
- name: Test setup-ngxblocker - Various Distro Nginx Conf Files Test (Needs Fixing)
|
||||
- name: Test setup-ngxblocker - Various Distro Nginx Conf Files Test
|
||||
shell: bash
|
||||
run: |
|
||||
pwd
|
||||
./dev-tools/test-setupngxblocker.sh
|
||||
|
||||
- name: Run Beta Tests
|
||||
|
@ -88,10 +87,10 @@ jobs:
|
|||
./dev-tools/beta-test-blocker-false-positives.sh
|
||||
./dev-tools/beta-test-blocker.sh
|
||||
./dev-tools/beta-test-blocker-badwords.sh
|
||||
#./dev-tools/beta-test-blocker-whitelist-domains.sh
|
||||
#./dev-tools/beta-test-blocker-whitelist-ips.sh
|
||||
#./dev-tools/beta-test-blocker-rate-limiting.sh
|
||||
#./dev-tools/beta-test-blocker-whitelist.sh
|
||||
./dev-tools/beta-test-blocker-whitelist-domains.sh
|
||||
./dev-tools/beta-test-blocker-whitelist-ips.sh
|
||||
./dev-tools/beta-test-blocker-rate-limiting.sh
|
||||
./dev-tools/beta-test-blocker-whitelist.sh
|
||||
|
||||
- name: Debug
|
||||
shell: bash
|
||||
|
|
1
dev-tools/buildnumber
Normal file
1
dev-tools/buildnumber
Normal file
|
@ -0,0 +1 @@
|
|||
2450
|
|
@ -16,6 +16,10 @@
|
|||
# #
|
||||
##############################################################################
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
export TERM=xterm
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# MIT License
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -61,14 +65,17 @@ defaultcolor=$(tput setaf default)
|
|||
|
||||
YEAR=$(date +"%Y")
|
||||
MONTH=$(date +"%m")
|
||||
cd ${TRAVIS_BUILD_DIR}
|
||||
|
||||
# ---------
|
||||
# FUNCTIONS
|
||||
# ---------
|
||||
|
||||
lastbuild=$(cat ./dev-tools/buildnumber)
|
||||
thisbuild=$((lastbuild + 1))
|
||||
echo ${thisbuild} > ./dev-tools/buildnumber
|
||||
|
||||
releaseNewVersion () {
|
||||
latestbuild=V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}
|
||||
latestbuild=V4.${YEAR}.${MONTH}.${thisbuild}
|
||||
printf "\n"
|
||||
echo "${bold}${green}All Nginx Tests Completed"
|
||||
echo "${bold}${green}All Bot and Referrer Testing Completed"
|
||||
|
@ -77,17 +84,26 @@ echo "${bold}${magenta}Releasing ${latestbuild}"
|
|||
}
|
||||
|
||||
commitBuildChanges () {
|
||||
git remote rm origin
|
||||
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
git config --global user.email "${GIT_EMAIL}"
|
||||
git config --global user.name "${GIT_NAME}"
|
||||
git config --global push.default simple
|
||||
git checkout master
|
||||
cd ${TRAVIS_BUILD_DIR}/.latest_release/
|
||||
tar -czf conf.d.tar.gz -C ${TRAVIS_BUILD_DIR}/conf.d/ .
|
||||
tar -czf bots.d.tar.gz -C ${TRAVIS_BUILD_DIR}/bots.d/ .
|
||||
git add -A
|
||||
git commit -am "V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} [ci skip]"
|
||||
git config --global user.name "mitchellkrogza"
|
||||
git config --global user.email "mitchellkrog@gmail.com"
|
||||
git add -A
|
||||
git commit -m "${LATESTBUILD}"
|
||||
git push
|
||||
}
|
||||
|
||||
deployPackage () {
|
||||
printf "\n"
|
||||
echo "${bold}${green}DEPLOYING ${LATESTBUILD}"
|
||||
printf "\n"
|
||||
git config --global user.name "mitchellkrogza"
|
||||
git config --global user.email "mitchellkrog@gmail.com"
|
||||
export GIT_TAG=V4.${YEAR}.${MONTH}.${thisbuild}
|
||||
git tag ${GIT_TAG} -a -m "V4.${YEAR}.${MONTH}.${thisbuild}"
|
||||
sudo git push origin master && git push origin master --tags
|
||||
echo "${bold}${green}-------------------------------"
|
||||
echo "${bold}${green}Deploying V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER}"
|
||||
echo "${bold}${green}-------------------------------"
|
||||
printf "\n\n"
|
||||
}
|
||||
|
||||
# -------------
|
||||
|
@ -96,6 +112,7 @@ git commit -am "V4.${YEAR}.${MONTH}.${TRAVIS_BUILD_NUMBER} [ci skip]"
|
|||
|
||||
releaseNewVersion
|
||||
commitBuildChanges
|
||||
deployPackage
|
||||
|
||||
# ----------------------
|
||||
# Exit With Error Number
|
||||
|
|
8
dev-tools/test_units/.directory
Normal file
8
dev-tools/test_units/.directory
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Dolphin]
|
||||
PreviewsShown=false
|
||||
Timestamp=2021,7,5,9,19,33.745
|
||||
Version=4
|
||||
ViewMode=1
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
Loading…
Add table
Reference in a new issue