From 5caea8eff91d059a6470b13bd40b7a7c025dc36d Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Fri, 25 Dec 2020 01:17:44 -0800 Subject: [PATCH] fix(CI): update procedure/function check (#4046) --- .github/workflows/check_pending_sql.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check_pending_sql.yml b/.github/workflows/check_pending_sql.yml index 3262b9503..9c5039100 100644 --- a/.github/workflows/check_pending_sql.yml +++ b/.github/workflows/check_pending_sql.yml @@ -9,12 +9,13 @@ jobs: - uses: actions/checkout@v2 - name: Check for Procedure/Function run: | - if grep -R -q -i -E "(PROCEDURE|FUNCTION)" data/sql/updates/pending* - then - exit 1 - else - exit 0 + for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do + if $(cat "$i"|sed "s/'.*'\(.*\)/\1/g"|grep -q -i -E "(PROCEDURE|FUNCTION)"); then + exit 1 + else + exit 0 fi + done - name: Semicolon check run: | for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do