mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 10:19:34 +00:00
Fix new(ish) db migration and add check
This commit is contained in:
20
dev/versions
20
dev/versions
@@ -77,6 +77,20 @@ colorGoVersion2() {
|
||||
echo "* $fileName:$res"
|
||||
}
|
||||
|
||||
colorEqual() {
|
||||
local first="$1"
|
||||
local second="$2"
|
||||
|
||||
if [ "$first" = "$second" ]; then
|
||||
res=$(echo $first | sed -e "s/$first/${COL_LIGHT_GREEN}$first${COL_NC}/")
|
||||
echo " $res"
|
||||
else
|
||||
res=$(echo $first | sed -e "s/$first/${COL_LIGHT_RED}$first${COL_NC}/")
|
||||
echo " $res, but have $second"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
echo
|
||||
|
||||
cd ../boulder
|
||||
@@ -112,3 +126,9 @@ grep GO_VERSION ../boulder/docker-compose.yml | sed -e "s/\s*GO_VERSION:/ /"
|
||||
colorGoVersion2 build/docker-compose.yml $goversion
|
||||
echo
|
||||
|
||||
db_migrs=$(ls -1 ../boulder/sa/db/boulder_sa/ | wc -l)
|
||||
db_patches=$(ls -1 ../labca/patches/db_migrations* | wc -l)
|
||||
echo -n "Database migrations "
|
||||
colorEqual $db_migrs $db_patches
|
||||
echo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user