From abfa824fcce96689456a6d92d288d9d2fc428112 Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Wed, 25 Nov 2020 09:31:01 -0800 Subject: [PATCH] feat(CI): Add check for semicolon at end of pending sql update file #3749 --- .github/workflows/check_pending_sql.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/check_pending_sql.yml b/.github/workflows/check_pending_sql.yml index 9704fe02c..de67fe0dc 100644 --- a/.github/workflows/check_pending_sql.yml +++ b/.github/workflows/check_pending_sql.yml @@ -15,3 +15,13 @@ jobs: else exit 0 fi + - name: Semicolon check + run: | + for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do + if [[ $(tail -c 2 "$i") != ";" ]]; then + echo "Missing Semicolon at the end of the file. (;)" + exit 1 + else + exit 0 + fi + done