Skip to content

Commit d98b02f

Browse files
committed
added bower.json validation
1 parent 9ac6183 commit d98b02f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hooks/pre-commit

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33

44
PCK_VERSION=$(cat package.json | jq '.version')
55
LOCK_VERSION=$(cat package-lock.json | jq '.version')
6+
BOWER_VERSION=$(cat bower.json | jq '.version')
67
SCRIPT_VERSION=\"$(sed -n 3p SendBirdCall.min.js | awk '{print $6}' | awk -F v '{print $2}')\"
78
SCRIPT_ENV=$(sed -n 3p SendBirdCall.min.js | awk '{print $7}')
89

9-
if [[ ! (($PCK_VERSION == $LOCK_VERSION) && ($PCK_VERSION == $SCRIPT_VERSION)) ]]
10+
if [[ ! (($PCK_VERSION == $LOCK_VERSION) && ($PCK_VERSION == $SCRIPT_VERSION) && ($PCK_VERSION == $BOWER_VERSION)) ]]
1011
then
1112
echo -e "\033[0;31m\
12-
Error: Version in package.json, package-lock.json and SendBirdCall.min.js does not match\
13+
Error: Version in package.json, package-lock.json, bower.json and SendBirdCall.min.js does not match\
1314
\033[0m"
1415

1516
exit 1

0 commit comments

Comments
 (0)