From b7018f84231184a8ed4ffe3ac2b6978fe36e370f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=80=E6=A2=A6?= <3501646051@qq.com> Date: Mon, 15 Dec 2025 17:24:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(scripts):=20=E5=B0=86=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=92=8C=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E5=88=B0scripts=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将start.sh、start.bat和build-and-publish.bat移动到scripts目录下 重构build-and-publish.bat脚本,增加错误处理和详细日志 --- build-and-publish.bat => script/build-and-publish.bat | 4 ++-- start.bat => script/start.bat | 1 + start.sh => script/start.sh | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) rename build-and-publish.bat => script/build-and-publish.bat (98%) rename start.bat => script/start.bat (78%) rename start.sh => script/start.sh (66%) mode change 100755 => 100644 diff --git a/build-and-publish.bat b/script/build-and-publish.bat similarity index 98% rename from build-and-publish.bat rename to script/build-and-publish.bat index 6d51315..fcfd5a4 100644 --- a/build-and-publish.bat +++ b/script/build-and-publish.bat @@ -4,8 +4,8 @@ setlocal EnableExtensions chcp 65001 >nul REM Paths and settings -set "ROOT_DIR=%~dp0" -set "PROJECT_DIR=%ROOT_DIR%" +cd /d "%~dp0.." +set "PROJECT_DIR=%CD%\" set "DIST_DIR=%PROJECT_DIR%docs\.vuepress\dist" set "PUBLISH_DIR=%PROJECT_DIR%_publish" set "REMOTE_URL=https://gitea.simengweb.com/si-meng-spec/build_notes_simengweb.git" diff --git a/start.bat b/script/start.bat similarity index 78% rename from start.bat rename to script/start.bat index 729c848..0a233cb 100644 --- a/start.bat +++ b/script/start.bat @@ -1,2 +1,3 @@ @echo off +cd /d "%~dp0.." npm run docs:dev -- --host 0.0.0.0 --port 8888 diff --git a/start.sh b/script/start.sh old mode 100755 new mode 100644 similarity index 66% rename from start.sh rename to script/start.sh index f054f58..d67d4b7 --- a/start.sh +++ b/script/start.sh @@ -1 +1,2 @@ +cd "$(dirname "$0")/.." npm run docs:dev -- --host 0.0.0.0 --port 8888