1
This commit is contained in:
parent
9d23cf84bb
commit
9283953cb2
1
githooks/applypatch-msg
Executable file
1
githooks/applypatch-msg
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/python
|
0
githooks/commit-msg
Executable file
0
githooks/commit-msg
Executable file
40
githooks/install.sh
Executable file
40
githooks/install.sh
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
basepath=$(cd `dirname $0`; pwd)
|
||||||
|
githooks_dir=${basepath}/../../../../.git/hooks
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/applypatch-msg ]; then
|
||||||
|
ln -s $basepath/applypatch-msg $githooks_dir/applypatch-msg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/commit-msg ]; then
|
||||||
|
ln -s $basepath/commit-msg $githooks_dir/commit-msg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/post-update ]; then
|
||||||
|
ln -s $basepath/post-update $githooks_dir/post-update
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/pre-applypatch ]; then
|
||||||
|
ln -s $basepath/pre-applypatch $githooks_dir/pre-applypatch
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/pre-commit ]; then
|
||||||
|
ln -s $basepath/pre-commit $githooks_dir/pre-commit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/prepare-commit-msg ]; then
|
||||||
|
ln -s $basepath/prepare-commit-msg $githooks_dir/prepare-commit-msg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/pre-push ]; then
|
||||||
|
ln -s $basepath/pre-push $githooks_dir/pre-push
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/pre-rebase ]; then
|
||||||
|
ln -s $basepath/pre-rebase $githooks_dir/pre-rebase
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -L $githooks_dir/update ]; then
|
||||||
|
ln -s $basepath/update $githooks_dir/update
|
||||||
|
fi
|
0
githooks/post-update
Executable file
0
githooks/post-update
Executable file
0
githooks/pre-applypatch
Executable file
0
githooks/pre-applypatch
Executable file
21
githooks/pre-commit
Executable file
21
githooks/pre-commit
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
env |grep -q "is_out_net"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# git branch|grep -q "* dev"
|
||||||
|
# if [ $? -ne 0 ]; then
|
||||||
|
# echo 'not dev branch, exit'
|
||||||
|
# exit 0
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# echo 'no sync protocol to svn'
|
||||||
|
|
||||||
|
git branch|grep -q "* master"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
svn update ~/opensource/game1008_proto
|
||||||
|
cp -f server/tools/protobuild/cs_*.proto ~/opensource/game1008_proto
|
||||||
|
svn commit -m '同步协议' ~/opensource/game1008_proto
|
||||||
|
fi
|
0
githooks/pre-push
Executable file
0
githooks/pre-push
Executable file
0
githooks/pre-rebase
Executable file
0
githooks/pre-rebase
Executable file
0
githooks/prepare-commit-msg
Executable file
0
githooks/prepare-commit-msg
Executable file
0
githooks/update
Executable file
0
githooks/update
Executable file
@ -102,8 +102,8 @@ parser.add_option(
|
|||||||
help = "",
|
help = "",
|
||||||
)
|
)
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
#if not options.nohooks:
|
if not options.nohooks:
|
||||||
# repair_githooks()
|
repair_githooks()
|
||||||
|
|
||||||
if need_rebuild(options.pb_files.split(',')):
|
if need_rebuild(options.pb_files.split(',')):
|
||||||
rebuild(options.cpp_out, options.python_out, options.pb_files.split(','))
|
rebuild(options.cpp_out, options.python_out, options.pb_files.split(','))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user