Skip to content

Commit b9839da

Browse files
committed
Merge pull request #23 from urielka/master
Call json_syntax_check on json files in pre-receive
2 parents d9dbfc8 + 32e8252 commit b9839da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pre-receive

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ while read oldrev newrev refname; do
7373
failures=`expr $failures + 1`
7474
fi
7575
fi
76+
77+
#check hiera data (json) syntax
78+
if [ $(echo $changedfile | grep -q '\.*.json$'; echo $?) -eq 0 ]; then
79+
${subhook_root}/json_syntax_check.sh $tmpmodule "${tmptree}/"
80+
RC=$?
81+
if [ "$RC" -ne 0 ]; then
82+
failures=`expr $failures + 1`
83+
fi
84+
fi
7685
else
7786
echo "ruby not installed. Skipping erb/yaml checks..."
7887
fi

0 commit comments

Comments
 (0)