mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
Ensure git reset --hard is realy desired
This commit is contained in:
parent
831e708897
commit
7a47d81b7b
13
setup.sh
13
setup.sh
|
@ -117,12 +117,12 @@ function reset() {
|
|||
echo "----------------------------"
|
||||
echo "Reseting branch and virtual env"
|
||||
echo "----------------------------"
|
||||
|
||||
if [ "1" == $(git branch -vv |grep -cE "\* develop|\* master") ]
|
||||
then
|
||||
if [ -d ".env" ]; then
|
||||
echo "- Delete your previous virtual env"
|
||||
rm -rf .env
|
||||
fi
|
||||
|
||||
read -p "Reset git branch? (This will remove all changes you made!) [y/N]? "
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
|
||||
git fetch -a
|
||||
|
||||
|
@ -135,10 +135,15 @@ function reset() {
|
|||
echo "- Hard resetting of 'master' branch."
|
||||
git reset --hard origin/master
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Reset ignored because you are not on 'master' or 'develop'."
|
||||
fi
|
||||
|
||||
if [ -d ".env" ]; then
|
||||
echo "- Delete your previous virtual env"
|
||||
rm -rf .env
|
||||
fi
|
||||
echo
|
||||
${PYTHON} -m venv .env
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user