mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
update
This commit is contained in:
7
luban_examples/githooks-demo/README.md
Normal file
7
luban_examples/githooks-demo/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# 设置客户端 git hook
|
||||
|
||||
- 参考pre-commit文件,将文件中的'./auto_validation.sh' 修改为合适的脚本
|
||||
- 参考 auto_validation.sh 准备合适的验证脚本
|
||||
- 将pre-commit复制到仓库根目录的 .git/hooks目录。 命令类似于'cp -rf pre-commit ${仓库根目录}/.git/hooks'
|
||||
- 完成设置
|
13
luban_examples/githooks-demo/auto_validation.sh
Normal file
13
luban_examples/githooks-demo/auto_validation.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
WORKSPACE=..
|
||||
|
||||
LUBAN_DLL=$WORKSPACE/Tools/Luban/Luban.dll
|
||||
CONF_ROOT=.
|
||||
|
||||
dotnet $LUBAN_DLL \
|
||||
-t all \
|
||||
-f \
|
||||
--conf $CONF_ROOT/luban.conf \
|
||||
-x pathValidator.rootDir=$WORKSPACE/Projects/Csharp_Unity_bin \
|
||||
-x l10n.textProviderFile=$CONF_ROOT/Datas/l10n/texts.json
|
13
luban_examples/githooks-demo/pre-commit
Normal file
13
luban_examples/githooks-demo/pre-commit
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 注意 git hook 默认运行位置在 Config 文件夹下
|
||||
|
||||
./auto_validation.sh
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "当前配置有错误, 请修复错误再进行推送!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# accept
|
||||
exit 0
|
Reference in New Issue
Block a user