diff --git a/check_migrations.sh b/check_migrations.sh index 9db8143b2..1c2aa4e6a 100755 --- a/check_migrations.sh +++ b/check_migrations.sh @@ -11,13 +11,14 @@ # A chamada do django 1.10 INVERTE ISSO. # # https://docs.djangoproject.com/en/1.10/ref/django-admin/#cmdoption-makemigrations-check -if python manage.py makemigrations --dry-run --exit > /dev/null; then +git_project_root=$(git rev-parse --show-toplevel) +if python ${git_project_root}/manage.py makemigrations --dry-run --exit > /dev/null; then NC='\033[0m' RED='\033[0;31m' echo echo -e "${RED}ALGUMAS ALTERAÇÕES EXIGEM MIGRAÇÃO.${NC}" - echo -e "${RED}RODE 'python manage.py makemigrations' ANTES DE SUBMETER SEU CÓDIGO...${NC}" - echo -e "${RED}lembre de adicionar os arquivos criados ao git com 'git add .' ou semelhante.${NC}" + echo -e "${RED}Execute o comando 'python manage.py makemigrations' ANTES DE SUBMETER SEU CÓDIGO...${NC}" + echo -e "${RED}Lembre de adicionar os arquivos criados ao git com 'git add ' ou semelhante.${NC}" echo exit 1 -fi \ No newline at end of file +fi