tools/scripts/githooks/pre-commit
aozhiwei b44f1b9c11 1
2019-12-16 16:15:34 +08:00

14 lines
329 B
Bash
Executable File

#!/bin/bash
if [[ ! -d "../client_proto/resources" ]]; then
echo "nosync proto"
exit 0
fi
git branch|grep -q "* master"
if [ $? -eq 0 ]; then
svn update ../client_proto/resources/
cp -f server/tools/protobuild/cs_*.proto ../client_proto/resources/
svn commit -m '同步协议' ../client_proto/resources/
fi