1 Star 0 Fork 0

超级大蘑菇头 / githooks

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
commit-msg 460 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# 接收git-commit传过来的参数 message
fileName=$1
message=$(<$fileName)
# 获取当前分支名
branchName=$(git symbolic-ref --short HEAD)
# 获取当前路径
project_path=$(cd `dirname $0`; pwd)
# 拼接python路径
python_dir_path="/scripts/commit_msg.py"
python_path=$project_path$python_dir_path
# 执行python
python $python_path $branchName $message
# shell 接收python脚本参数
if [ $? == "0" ];then
exit 0
else
exit 1
fi
Python
1
https://gitee.com/mogoo/githooks.git
git@gitee.com:mogoo/githooks.git
mogoo
githooks
githooks
main

搜索帮助