Last active
August 10, 2018 05:11
-
-
Save leopard627/1cb143473e66aeca3601c70f691ca975 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "\033[1;34m" | |
cat << "EOF" | |
___ ____ _ _ ______ | |
| \/ (_) | | (_) |___ / | |
| . . |_ __ _ _ __ __ _| |_ _ ___ _ __ / / ___ _ __ ___ | |
| |\/| | |/ _` | '__/ _` | __| |/ _ \| '_ \ / / / _ \| '_ \ / _ \ | |
| | | | | (_| | | | (_| | |_| | (_) | | | | ./ /__| (_) | | | | __/ | |
\_| |_/_|\__, |_| \__,_|\__|_|\___/|_| |_| \_____/\___/|_| |_|\___| | |
__/ | | |
|___/ | |
EOF | |
echo "\033[0;37m" | |
echo Hi there which stage wanna migrate? 1.dev 2.stage 3.product? | |
read choice | |
if [[ choice -eq 1 ]]; then | |
echo migrate local developments!! | |
stage=developments | |
elif [[ choice -eq 2 ]]; then | |
echo migrate local staging!! | |
stage=staging | |
elif [[ choice -eq 3 ]]; then | |
echo *** ARE YOU SURE? *** | |
echo migrate local product!! *** ARE YOU SURE? *** | |
fi | |
cd alibaba_api && python3 manage.py makemigrations --settings=alibaba_api.settings.${stage} | |
python3 manage.py migrate --settings=alibaba_api.settings.${stage} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment