mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 07:22:16 -07:00
update format.sh
add shellcheck to format.sh add statement macros to .clang-format add no clang format to format.sh add changed file list to format.sh diff rename --cf-version to --print-version in format.sh lint files
This commit is contained in:
parent
b8983f27ab
commit
209d66fe82
13 changed files with 130 additions and 27 deletions
|
|
@ -6,6 +6,7 @@ version_line="$(grep 'INSERT INTO cockatrice_schema_version' servatrice/servatri
|
|||
version_line="${version_line#*VALUES(}"
|
||||
declare -i schema_ver="${version_line%%)*}"
|
||||
|
||||
# shellcheck disable=2012
|
||||
latest_migration="$(ls -1 servatrice/migrations/ | tail -n1)"
|
||||
xtoysql="${latest_migration#servatrice_}"
|
||||
xtoy="${xtoysql%.sql}"
|
||||
|
|
@ -23,7 +24,7 @@ if ((schema_ver != new_ver)); then
|
|||
fi
|
||||
|
||||
expected_sql="^UPDATE cockatrice_schema_version SET version=${new_ver} WHERE version=${old_ver};$"
|
||||
if ! grep -q "$expected_sql" servatrice/migrations/$latest_migration; then
|
||||
if ! grep -q "$expected_sql" "servatrice/migrations/$latest_migration"; then
|
||||
echo "$latest_migration does not contain expected sql: $expected_sql"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue