From 093a5a99d43886a0b562cf716053b9289a143ffa Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 11 Jan 2024 22:38:54 +0800 Subject: [PATCH] fix autoupdate --- .github/workflows/autoupdate.yml | 1 - scripts/autoupdate.lua | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/autoupdate.yml index e029f3f8366..90d9c134bf7 100644 --- a/.github/workflows/autoupdate.yml +++ b/.github/workflows/autoupdate.yml @@ -20,7 +20,6 @@ jobs: - uses: xmake-io/github-action-setup-xmake@v1 with: xmake-version: latest - actions-cache-folder: '.xmake-cache' - name: Installation run: | diff --git a/scripts/autoupdate.lua b/scripts/autoupdate.lua index d3565b1e733..1f8a90440d0 100644 --- a/scripts/autoupdate.lua +++ b/scripts/autoupdate.lua @@ -59,6 +59,7 @@ function _update_version(instance, version, shasum) local branch_current = os.iorun("git branch --show-current"):trim() local repourl = "git@github.com:xmake-io/xmake-repo.git" os.vexec("git reset --hard HEAD") + os.vexec("git clean -fdx") os.execv("git", {"branch", "-D", branch}, {try = true}) os.vexec("git checkout dev") os.vexec("git pull %s dev", repourl) @@ -82,7 +83,8 @@ function _update_version(instance, version, shasum) os.vexec("git add .") os.vexec("git commit -a -m \"Update %s to %s\"", instance:name(), version) os.vexec("git push %s %s:%s", repourl, branch, branch) - os.vexec("gh pr create --title \"Auto-update %s to %s\" --body \"%s\" -R xmake-io/xmake-repo -B dev -H %s", instance:name(), version, body, branch) + os.vexec("gh pr create --label \"auto-update\" --title \"Auto-update %s to %s\" --body \"%s\" -R xmake-io/xmake-repo -B dev -H %s", + instance:name(), version, body, branch) end os.vexec("git reset --hard HEAD") os.vexec("git checkout %s", branch_current)