From a2544d237e0f17cd322d41d714351884a61ecfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9D=A4=E6=98=AF=E7=BA=B1=E9=9B=BE=E9=85=B1=E5=93=9F?= =?UTF-8?q?=EF=BD=9E?= <49941141+Dragon1573@users.noreply.github.com> Date: Thu, 21 Aug 2025 21:16:15 +0800 Subject: [PATCH] ci: improve commit checking and update release version script (#4471) - Increase `fetch-depth` to 50 for more accurate commit history in CI - Update `release-version.mjs` to use `bash` explicitly for improved compatibility - Also avoid errors when invoking the script Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com> --- .github/workflows/check-commit-needs-build.yml | 2 +- scripts/release-version.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-commit-needs-build.yml b/.github/workflows/check-commit-needs-build.yml index c3496a00..59a730a7 100644 --- a/.github/workflows/check-commit-needs-build.yml +++ b/.github/workflows/check-commit-needs-build.yml @@ -55,7 +55,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 2 + fetch-depth: 50 - name: Check if version changed or src changed id: check diff --git a/scripts/release-version.mjs b/scripts/release-version.mjs index 7e61170d..a628aaaf 100644 --- a/scripts/release-version.mjs +++ b/scripts/release-version.mjs @@ -53,7 +53,7 @@ function getGitShortCommit() { */ function getLatestTauriCommit() { try { - const fullHash = execSync("./scripts-workflow/get_latest_tauri_commit.bash") + const fullHash = execSync("bash ./scripts-workflow/get_latest_tauri_commit.bash") .toString() .trim(); return execSync(`git rev-parse --short ${fullHash}`).toString().trim();