Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a68848f

Browse files
committed
(Auto) adjusting micro version (to current month)
1 parent a4f2139 commit a68848f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

extra/shutils/precommit-hook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ -f $FULLPATH ]
1010
then
1111
LINE=$(grep -o ${FULLPATH} -e 'VERSION = "[0-9.]*"');
1212
declare -a LINE;
13-
INCREMENTED=$(python -c "import re, sys; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); _.append(0) if len(_) < 3 else _; _[-1] = str(int(_[-1]) + 1); print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
13+
INCREMENTED=$(python -c "import re, sys, time; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); _.append(0) if len(_) < 3 else _; _[-1] = str(int(_[-1]) + 1); month = str(time.gmtime().tm_mon); _[-1] = '1' if _[-2] != month else _[-1]; _[-2] = month; print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
1414
if [ -n "$INCREMENTED" ]
1515
then
1616
sed "s/${LINE}/${INCREMENTED}/" $FULLPATH > $FULLPATH.tmp && mv $FULLPATH.tmp $FULLPATH

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from lib.core.revision import getRevisionNumber
2121

2222
# sqlmap version and site
23-
VERSION = "1.0.0.22"
23+
VERSION = "1.0.3.1"
2424
REVISION = getRevisionNumber()
2525
STABLE = VERSION.count('.') <= 2
2626
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

0 commit comments

Comments
 (0)