fix(ci): update semicolon check #3799

add sed to filter out comments with --
This commit is contained in:
Patrick Lewis 2020-11-28 16:42:20 -08:00 committed by GitHub
parent f487439473
commit cfc5cf3d83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ jobs:
- name: Semicolon check
run: |
for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do
if [[ $(cat "$i"|tr -d '\n'|tail -c 1) != ";" ]]; then
if [[ $(cat "$i"|sed 's/ --.*$//'|tr -d '\n'|tail -c 1) != ";" ]]; then
echo "Missing Semicolon at the end of the file. (;)"
exit 1
else