mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 11:48:29 +08:00
36b9c6b4c3
* chore: update husky * chore: update github workflows * chore: update scripts * chore: fix workflow
14 lines
333 B
Bash
Executable File
14 lines
333 B
Bash
Executable File
#!/usr/bin/env sh
|
|
. "$(dirname -- "$0")/_/husky.sh"
|
|
|
|
protected_branches="master v5"
|
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
for branch in $protected_branches; do
|
|
if [ "$current_branch" == "$branch" ]; then
|
|
echo "\033[31mDirect commit to '$branch' branch are not allowed!\033[0m"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
npx lint-staged
|