mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-23 22:57:40 +08:00
23 lines
561 B
Bash
Executable file
23 lines
561 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Missing migrations detection
|
|
|
|
. ci/lib.sh
|
|
|
|
cleanup_database
|
|
run_coverage ./manage.py migrate
|
|
run_coverage ./manage.py makemigrations
|
|
check
|
|
if [ "$(git status -s -- '*/migrations/*' | wc -l)" -gt 0 ]; then
|
|
echo 'There are untracked migrations:'
|
|
git status -s --porcelain -- '*/migrations/*' | sed -n '/^??/ s/^?? \(.*\)/\1/p' | while read -r migration; do
|
|
echo "$migration"
|
|
cat "$migration"
|
|
echo
|
|
done
|
|
exit 1
|
|
fi
|