mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
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:
parent
06081bd940
commit
f1563c5604
4 changed files with 81 additions and 24 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue