diff --git a/hooks/dataform_compile.sh b/hooks/dataform_compile.sh index a036793..56f7b47 100755 --- a/hooks/dataform_compile.sh +++ b/hooks/dataform_compile.sh @@ -15,7 +15,7 @@ fi dataform install dataform compile -if [[ $? -ne 0 ]]; then +if [ $? -ne 0 ]; then exit 1 else exit 0 diff --git a/hooks/dataform_format.sh b/hooks/dataform_format.sh index 5988135..a9e240f 100755 --- a/hooks/dataform_format.sh +++ b/hooks/dataform_format.sh @@ -14,11 +14,11 @@ fi # Compute hash of all files in the project before and after formatting to detect changes -hash_before_format=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') +hash_before_format=$(find ./definitions ./includes -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') dataform format -hash_after_format=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') +hash_after_format=$(find ./definitions ./includes -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}') if [ "$hash_before_format" != "$hash_after_format" ]; then exit 1