Skip to content

Commit 165b275

Browse files
committed
Update of version
1 parent 811bd0e commit 165b275

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

extra/shutils/precommit-hook.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ CHECKSUM_FULLPATH=${SCRIPTPATH%/*}/$CHECKSUM
1212

1313
git diff $SETTINGS_FULLPATH | grep "VERSION =" > /dev/null && exit 0
1414

15-
if [ -f $SETTINGS_FULLPATH ]
16-
then
17-
LINE=$(grep -o ${SETTINGS_FULLPATH} -e 'VERSION = "[0-9.]*"')
18-
declare -a LINE
19-
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] = '0' if _[-2] != month else _[-1]; _[-2] = month; print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
20-
if [ -n "$INCREMENTED" ]
21-
then
22-
sed -i "s/${LINE}/${INCREMENTED}/" $SETTINGS_FULLPATH
23-
echo "Updated ${INCREMENTED} in ${SETTINGS_FULLPATH}"
24-
else
25-
echo "Something went wrong in VERSION increment"
26-
exit 1
27-
fi
28-
git add "$SETTINGS_FULLPATH"
29-
fi
15+
# if [ -f $SETTINGS_FULLPATH ]
16+
# then
17+
# LINE=$(grep -o ${SETTINGS_FULLPATH} -e 'VERSION = "[0-9.]*"')
18+
# declare -a LINE
19+
# 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] = '0' if _[-2] != month else _[-1]; _[-2] = month; print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
20+
# if [ -n "$INCREMENTED" ]
21+
# then
22+
# sed -i "s/${LINE}/${INCREMENTED}/" $SETTINGS_FULLPATH
23+
# echo "Updated ${INCREMENTED} in ${SETTINGS_FULLPATH}"
24+
# else
25+
# echo "Something went wrong in VERSION increment"
26+
# exit 1
27+
# fi
28+
# git add "$SETTINGS_FULLPATH"
29+
# fi
3030

3131
truncate -s 0 "$CHECKSUM_FULLPATH"
3232
cd $PROJECT_FULLPATH && for i in $(find . -name "*.py" -o -name "*.xml" -o -iname "*_" | sort); do git ls-files $i --error-unmatch &>/dev/null && md5sum $i | stdbuf -i0 -o0 -e0 sed 's/\.\///' >> "$CHECKSUM_FULLPATH"; git add "$CHECKSUM_FULLPATH"; done

lib/core/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.0"
22+
VERSION = "1.2"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py
4646
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4747
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4848
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
49-
721aa33528391016ea7eaf9d36307666 lib/core/settings.py
49+
e5967d7d5119cf82bb78949a40fa0486 lib/core/settings.py
5050
d0adc28a38e43a787df4471f7f027413 lib/core/shell.py
5151
63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py
5252
505aaa61e1bba3c3d4567c3e667699e3 lib/core/target.py

0 commit comments

Comments
 (0)