mirror of https://github.com/interlegis/sapl.git
1 changed files with 12 additions and 3 deletions
@ -1,8 +1,17 @@ |
|||
#!/bin/bash |
|||
|
|||
python manage.py makemigrations --dry-run --exit > /dev/null |
|||
python manage.py makemigrations --dry-run --exit |
|||
|
|||
MIGRATIONS=$? |
|||
|
|||
[ $MIGRATIONS -eq 0 ] && echo "You have unapplied code change. run 'python manage.py makemigrations'" && exit 1 |
|||
[ $MIGRATIONS -ne 0 ] && echo "" && exit 0 |
|||
NC='\033[0m' |
|||
|
|||
if [ $MIGRATIONS -eq 0 ]; then |
|||
RED='\033[0;31m' |
|||
echo -e "${RED}You have unapplied code changes. run 'python manage.py makemigrations' before submitting your code...${NC}" |
|||
exit 1 |
|||
else |
|||
GREEN='\033[0;32m' |
|||
echo -e "Working normally..." |
|||
exit 0 |
|||
fi |
|||
Loading…
Reference in new issue