From cd714ff22ae2beeb32e2d1267167c4ecb2ce0eb6 Mon Sep 17 00:00:00 2001 From: elysia Date: Wed, 1 Jul 2026 17:08:59 +0800 Subject: [PATCH] fix(build.sh): remove `rm -rf .git/` Signed-off-by: elysia --- .github/workflows/release.yml | 3 ++- build.sh | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 029e92687..ed3b166fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,8 @@ jobs: - name: Checkout uses: actions/checkout@v6 with: - fetch-depth: 0 + fetch-depth: 1 + fetch-tags: true - name: Install dependencies if: matrix.target-platform == '' diff --git a/build.sh b/build.sh index 813c48712..db2d186d3 100644 --- a/build.sh +++ b/build.sh @@ -178,7 +178,6 @@ BuildWin7() { } BuildDev() { - rm -rf .git/ mkdir -p "dist" muslflags="$(GetMuslStaticLdflags)" BASE="https://github.com/OpenListTeam/musl-compilers/releases/latest/download/" @@ -269,7 +268,6 @@ BuildDockerMultiplatform() { } BuildRelease() { - rm -rf .git/ mkdir -p "build" BuildWinArm64 ./build/"$appName"-windows-arm64.exe BuildWin7 ./build/"$appName"-windows7 @@ -442,7 +440,6 @@ BuildLoongGLIBC() { } BuildReleaseLinuxMusl() { - rm -rf .git/ mkdir -p "build" muslflags="$(GetMuslStaticLdflags)" BASE="https://github.com/OpenListTeam/musl-compilers/releases/latest/download/" @@ -471,7 +468,6 @@ BuildReleaseLinuxMusl() { } BuildReleaseLinuxMuslArm() { - rm -rf .git/ mkdir -p "build" muslflags="$(GetMuslStaticLdflags)" BASE="https://github.com/OpenListTeam/musl-compilers/releases/latest/download/" @@ -502,7 +498,6 @@ BuildReleaseLinuxMuslArm() { BuildReleaseAndroid() { - rm -rf .git/ mkdir -p "build" wget https://dl.google.com/android/repository/android-ndk-r26b-linux.zip unzip android-ndk-r26b-linux.zip @@ -523,7 +518,6 @@ BuildReleaseAndroid() { } BuildReleaseFreeBSD() { - rm -rf .git/ mkdir -p "build/freebsd" # Get latest FreeBSD 14.x release version from GitHub