Skip to content

Commit af6bec3

Browse files
committed
added auto incrementing release number reset with a new git tag version
1 parent 9aeccd5 commit af6bec3

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
sshfail2kml.json
22
sshfail2kml.sqlite
33
sshfail2kml.kml
4+
contrib/.release-*

contrib/fpm-createPackages.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@ if [ $? -ne 0 ];then
5555
exit 1
5656
fi
5757

58+
if [ -f "${PWD}/.release-${VER}" ];then
59+
. "${PWD}/.release-${VER}"
60+
RELEASE=$((RELEASE+1))
61+
else
62+
RELEASE="0"
63+
fi
64+
echo "RELEASE=$RELEASE" > "${PWD}/.release-${VER}"
65+
66+
67+
echo VER=$VER
68+
echo RELEASE=$RELEASE
69+
exit
70+
5871
install -d $DIR/var/lib/sshfail2kml $DIR/etc/cron.d $DIR/usr/bin
5972
cp -f ../sshfail2kml $DIR/usr/bin
6073
cp -f ../sshfail2kml.conf $DIR/etc

contrib/version.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# example, external file to work better with CI/CD
2-
VER="1.3.4"
3-
RELEASE="0"
2+
VER="1.3.5"

0 commit comments

Comments
 (0)