From ffd430285b28acfca3bac5905fa0213fdff55c61 Mon Sep 17 00:00:00 2001 From: sky5454 Date: Tue, 31 Mar 2026 03:20:06 +0800 Subject: [PATCH] feat(selfupgrade): only GetTestReleaseAPIURL . --- pkg/updater/updater.go | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/pkg/updater/updater.go b/pkg/updater/updater.go index 1f72e23aa..9abbfdc73 100644 --- a/pkg/updater/updater.go +++ b/pkg/updater/updater.go @@ -119,8 +119,8 @@ func UpdateSelfFromRelease(releaseURL, platform, arch, programName string) error // UpdateSelf updates the running executable by fetching the latest release // and applying the binary matching programName. func UpdateSelf(programName string) error { - // Default to test repo for now. Use GetProdReleaseAPIURL() for production. - return UpdateSelfFromRelease(GetTestReleaseAPIURL(), runtime.GOOS, runtime.GOARCH, programName) + // Use production repo by default. + return UpdateSelfFromRelease(GetProdReleaseAPIURL(), runtime.GOOS, runtime.GOARCH, programName) } // GetReleaseAPIURL returns the GitHub Releases API URL for the given repo owner. @@ -129,11 +129,6 @@ func GetReleaseAPIURL(owner string) string { return fmt.Sprintf("https://api.github.com/repos/%s/picoclaw/releases/latest", owner) } -// GetTestReleaseAPIURL returns the test release API URL (user fork). -func GetTestReleaseAPIURL() string { - return GetReleaseAPIURL("sky5454") -} - // GetProdReleaseAPIURL returns the production release API URL (upstream). func GetProdReleaseAPIURL() string { return GetReleaseAPIURL("sipeed") @@ -149,13 +144,8 @@ func findAssetURL(releaseURL, platform, arch string) (string, error) { apiURL := buildReleaseAPIURL(releaseURL) if apiURL == "" { - // If caller provided an empty releaseURL, default to test repo. - // Otherwise fall back to production repo API URL. - if strings.TrimSpace(releaseURL) == "" { - apiURL = GetTestReleaseAPIURL() - } else { - apiURL = GetProdReleaseAPIURL() - } + // Default to production repo API URL when no explicit release URL is provided. + apiURL = GetProdReleaseAPIURL() } resp, err := http.Get(apiURL)