add fedora docker image to travis compilation (#3447)

* add fedora docker image to travis compilation

fixes #1746

* add dockerfile

* would you like to please install for me? [y/n]

* remove bc dependency

* save cache separately for different docker builds

* add development packages to fedora dockerfile

* add package names

* use env values to make these all look the same

* set docker image name correctly

* add missing dependency

* minor oversight, add %% to remove all braces in check schema
This commit is contained in:
ebbit1q 2018-11-25 11:25:47 +01:00 committed by ctrlaltca
parent 06081bd940
commit f1563c5604
4 changed files with 81 additions and 24 deletions

View file

@ -2,13 +2,15 @@
set -e
schema_ver="$(grep 'INSERT INTO cockatrice_schema_version' servatrice/servatrice.sql | sed 's/.*VALUES(//' | sed 's/).*//')"
version_line="$(grep 'INSERT INTO cockatrice_schema_version' servatrice/servatrice.sql)"
version_line="${version_line#*VALUES(}"
declare -i schema_ver="${version_line%%)*}"
latest_migration="$(ls -1 servatrice/migrations/ | tail -n1)"
xtoysql="${latest_migration#servatrice_}"
xtoy="${xtoysql%.sql}"
old_ver="$(echo ${xtoy%%_to_*} | bc)"
new_ver="$(echo ${xtoy##*_to_} | bc)"
declare -i old_ver="10#${xtoy%_to_*}" #declare as integer with base 10, numbers with a leading 0 are normally interpreted as base 16
declare -i new_ver="10#${xtoy#*_to_}"
if ((old_ver >= new_ver)); then
echo "New version $new_ver is not newer than $old_ver"