mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-26 10:52:09 +08:00
18 lines
446 B
Bash
Executable file
18 lines
446 B
Bash
Executable file
#!/bin/sh
|
|
# Missing migrations detection
|
|
|
|
. ci/lib
|
|
|
|
cleanup_database
|
|
run_coverage ./manage.py migrate
|
|
run_coverage ./manage.py makemigrations
|
|
check
|
|
if [ `git status -s | grep -c /migrations/` -gt 0 ] ; then
|
|
echo 'There are untracked migrations:'
|
|
git status -s --porcelain | grep /migrations/ | sed -n '/^??/ s/^?? \(.*\)/\1/p' | while read migration ; do
|
|
echo $migration
|
|
cat $migration
|
|
echo
|
|
done
|
|
exit 1
|
|
fi
|