mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-05-29 06:14:15 +08:00
33 lines
745 B
Bash
Executable file
Vendored
33 lines
745 B
Bash
Executable file
Vendored
#!/bin/sh
|
|
# Migrations test executor
|
|
|
|
. ci/lib
|
|
|
|
TAGS="weblate-3.0.1 weblate-3.1.1"
|
|
DBS="sqlite mysql postgresql"
|
|
|
|
for CI_DATABASE in $DBS ; do
|
|
export CI_DATABASE
|
|
|
|
for tag in $TAGS ; do
|
|
rm weblate.db
|
|
git checkout $tag || continue
|
|
run_coverage ./manage.py migrate
|
|
check
|
|
git checkout $TRAVIS_COMMIT
|
|
run_coverage ./manage.py migrate
|
|
check
|
|
done
|
|
done
|
|
|
|
./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
|