feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
14
common/git-hooks/post-commit
Executable file
14
common/git-hooks/post-commit
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
if [ "$SKIP_COMMIT_MSG_HOOK" = "true" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# rebase 过程中分支名格式为 (no branch, rebasing chore/replace-rushtool)
|
||||
# 正常提交时分支名格式为 chore/replace-rushtool
|
||||
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
|
||||
# 如果匹配到 rebase 格式的输出,认为是在rebase ,则跳过自动推送
|
||||
if [[ "X${BRANCH_NAME}" == "X(no branch"* ]]; then
|
||||
exit
|
||||
else
|
||||
node common/scripts/install-run-rush.js change-x -a || exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user