From 9475e164afcbb96d12dadc7192aa63f1caabb6bb Mon Sep 17 00:00:00 2001 From: "n72595987@gmail.com" Date: Sat, 29 Nov 2025 18:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20CI=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=AD=A3=20martial-tool=20=E5=85=8B=E9=9A=86?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - Drone 的工作目录是 /drone/src(当前仓库) - 之前尝试 cd /drone 会失败 - 导致 martial-tool 克隆到错误位置 解决方案: - 使用 cd /drone/src/.. 导航到父目录 - 在 /drone/src/../martial-tool 位置克隆框架代码 - 编译时使用相同的路径 /drone/src/../martial-tool 路径结构: /drone/ ├── src/ # martial-master (当前仓库) └── martial-tool/ # BladeX 框架 (克隆的) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .drone.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index a644423..a2e6dac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,9 +15,10 @@ steps: image: alpine/git commands: - echo "克隆 BladeX 框架代码..." - - cd /drone + - echo "当前目录:$(pwd)" + - cd /drone/src/.. - git clone https://git.waypeak.work/martial/martial-tool.git - - ls -la /drone/martial-tool + - ls -la /drone/src/../martial-tool - echo "✅ 框架代码克隆完成" # 步骤1:编译 BladeX 框架 @@ -25,7 +26,7 @@ steps: image: maven:3.9-eclipse-temurin-17 commands: - echo "开始编译 BladeX 框架..." - - cd /drone/martial-tool + - cd /drone/src/../martial-tool - mvn clean install -DskipTests -q - echo "✅ BladeX 框架编译完成"