From 22e1b8fbb9ad4925221bfa27591a6406da7c9853 Mon Sep 17 00:00:00 2001 From: 2509_92447106 <2509_92447106@noreply.gitcode.com> Date: Sun, 8 Nov 2026 17:30:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildsh/tools.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 buildsh/tools.sh diff --git a/buildsh/tools.sh b/buildsh/tools.sh new file mode 100644 index 0000000..b39e9b0 --- /dev/null +++ b/buildsh/tools.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# buildsh/tools.sh —— 实用工具:模型、版本戳、清理、运行、医生、打开目录 + +bs_tools() { + ROOT_DIR="$1"; TASK="$2" + case "$TASK" in + models) + build_models ;; + stamp) + stamp_versions ;; + pack-models) + build_models; pack_models ;; + pack-launcher) + pack_launcher ;; + run) + dotnet run --project "$APP_PROJ" -c Debug ;; + test) + dotnet run --project "$TEST_PROJ" -c Debug -- "$ROOT_DIR/build/screenshots" ;; + update-test) + dotnet run --project "$TEST_PROJ" -c Debug -- --update-test "$ROOT_DIR" ;; + clean) + rm -rf "$ROOT_DIR/build" "$ROOT_DIR/dist" + find "$ROOT_DIR/src" -type d \( -name bin -o -name obj \) -prune -exec rm -rf {} + 2>/dev/null || true + echo "==> 已清理" ;; + doctor) + dotnet --info | head -20 ;; + dist) + echo "==> dist 产物:" + ls -lh "$ROOT_DIR"/dist 2>/dev/null || true ;; + *) + echo "未知工具: $TASK"; return 1 ;; + esac +}