SIGN IN SIGN UP
sqlmapproject / sqlmap UNCLAIMED

Automatic SQL injection and database takeover tool

0 0 0 Python
2016-03-17 17:06:11 +01:00
#!/bin/bash
2018-12-10 13:21:36 +01:00
: '
2018-12-10 13:20:34 +01:00
cat > .git/hooks/post-commit << EOF
#!/bin/bash
source ./extra/shutils/postcommit-hook.sh
EOF
chmod +x .git/hooks/post-commit
2018-12-10 13:21:36 +01:00
'
2018-12-10 13:20:34 +01:00
2016-03-17 17:06:11 +01:00
SETTINGS="../../lib/core/settings.py"
2019-02-04 15:54:57 +01:00
PYPI="../../extra/shutils/pypi.sh"
2016-03-17 17:06:11 +01:00
declare -x SCRIPTPATH="${0}"
FULLPATH=${SCRIPTPATH%/*}/$SETTINGS
if [ -f $FULLPATH ]
then
LINE=$(grep -o ${FULLPATH} -e 'VERSION = "[0-9.]*"')
declare -a LINE
2016-03-17 17:06:11 +01:00
NEW_TAG=$(python -c "import re, sys, time; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); print '.'.join(_[:-1]) if len(_) == 4 and _[-1] == '0' else ''" "$LINE")
if [ -n "$NEW_TAG" ]
then
2017-01-02 14:31:19 +01:00
#git commit -am "Automatic monthly tagging"
echo "Creating new tag ${NEW_TAG}"
git tag $NEW_TAG
2016-04-04 12:34:19 +02:00
git push origin $NEW_TAG
echo "Going to push PyPI package"
2019-02-04 15:54:57 +01:00
/bin/bash ${SCRIPTPATH%/*}/$PYPI
2016-03-17 17:06:11 +01:00
fi
fi