Skip to content

Commit 73764e9

Browse files
author
Hugo Rialan
committed
Improve hooks
1 parent 2a1dd21 commit 73764e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hooks/dataform_compile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fi
1515
dataform install
1616
dataform compile
1717

18-
if [[ $? -ne 0 ]]; then
18+
if [ $? -ne 0 ]; then
1919
exit 1
2020
else
2121
exit 0

hooks/dataform_format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ fi
1414

1515
# Compute hash of all files in the project before and after formatting to detect changes
1616

17-
hash_before_format=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}')
17+
hash_before_format=$(find ./definitions ./includes -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}')
1818

1919
dataform format
2020

21-
hash_after_format=$(find . -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}')
21+
hash_after_format=$(find ./definitions ./includes -type f -exec md5sum {} \; | awk '{print $1}' | sort | md5sum | awk '{print $1}')
2222

2323
if [ "$hash_before_format" != "$hash_after_format" ]; then
2424
exit 1

0 commit comments

Comments
 (0)