mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
29 lines
829 B
YAML
29 lines
829 B
YAML
name: Check pending SQL
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
check-pending-sql:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Check for Procedure/Function
|
|
run: |
|
|
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
|
|
if [[ $(cat "$i"|sed 's/ --[^--]*$//'|tr -d '\n'|tr -d " "|tail -c 1) != ";" ]]; then
|
|
echo "Missing Semicolon (;) or multiple newlines at the end of the file."
|
|
exit 1
|
|
else
|
|
exit 0
|
|
fi
|
|
done
|