Skip to content

Commit 98614fa

Browse files
chore(repo): make it work with zsh
1 parent 1da1898 commit 98614fa

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

check.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash -e
22

3+
if [[ $ZSH_NAME != "" ]]; then
4+
setopt BASH_REMATCH
5+
setopt RE_MATCH_PCRE
6+
setopt KSH_ARRAYS
7+
fi
8+
39
source ./validator.sh
410

511
COMMITS=`git log --no-merges --pretty="%H" --no-decorate $1`

validator.sh

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash -e
22

3+
if [[ $ZSH_NAME != "" ]]; then
4+
setopt BASH_REMATCH
5+
setopt RE_MATCH_PCRE
6+
setopt KSH_ARRAYS
7+
fi
8+
39
readonly HEADER_PATTERN="^([^\(]+)\(([^\)]+)\): (.+)$"
410
readonly TYPE_PATTERN="^(feat|fix|docs|refactor|test|chore|revert)$"
511
readonly SCOPE_PATTERN="^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"

0 commit comments

Comments
 (0)