Rename pre-commit to pre-push

This commit is contained in:
Jan Tuomi
2018-01-25 22:36:38 +02:00
parent cf50050eba
commit c671206e8a
3 changed files with 6 additions and 7 deletions
+3 -4
View File
@@ -44,7 +44,7 @@ then
exit 0
fi
$INTERACTIVE && read -p "Copy settings from template? [y/n]" -n 1 -r || REPLY="y"
$INTERACTIVE && read -p "Copy settings from template? (recommended) [y/n]" -n 1 -r || REPLY="y"
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]
@@ -52,13 +52,12 @@ then
cp "$PWD/sikweb/settings-sample.py" "$PWD/sikweb/settings.py"
fi
$INTERACTIVE && read -p "Copy pre-commit hook to .git/hooks? [y/n]" -n 1 -r || REPLY="y"
$INTERACTIVE && read -p "Copy pre-push hook to .git/hooks? (recommended) [y/n]" -n 1 -r || REPLY="y"
echo ""
if [[ $REPLY =~ ^[Yy]$ ]]
then
cp "$PWD/scripts/git/pre-commit" "$PWD/.git/hooks/pre-commit"
sed -i "s|VIRTUALENV_ACTIVATE|$(which activate)|g" "$PWD/.git/hooks/pre-commit"
cp "$PWD/scripts/git/pre-push" "$PWD/.git/hooks/pre-push"
fi