Rename pre-commit to pre-push
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user