Test with latest driver vesion

This commit is contained in:
Jinzhu 2020-06-19 18:44:19 +08:00
parent 7dc255acfe
commit e3292b3b41
1 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,14 @@ if [[ $(pwd) == *"gorm/tests"* ]]; then
cd .. cd ..
fi fi
if [ -d tests ]
then
cd tests
cp go.mod go.mod.bak
sed '/gorm.io\/driver/d' go.mod.bak > go.mod
cd ..
fi
for dialect in "${dialects[@]}" ; do for dialect in "${dialects[@]}" ; do
if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ] if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ]
then then
@ -35,3 +43,9 @@ for dialect in "${dialects[@]}" ; do
fi fi
fi fi
done done
if [ -d tests ]
then
cd tests
mv go.mod.bak go.mod
fi