Open EthanLin-TWer opened 7 years ago
后两个太难,暂时放弃了。
#!/bin/sh commit_regex="\[Linesh\]\[#\d*\]\s\(Chore\|Feature\|Fix\|Docs\|Style\|Refactor\|Test\):\s[a-z]" error_msg="Aborting commit, please double check your commit message." if ! echo "$1" | grep -iqE "$commit_regex" ; then echo "$error_msg" >&2 exit 1 fi
后两个太难,暂时放弃了。