fix: 解决安装包下载路径错误的问题 (#4954)
Some checks failed
Build / SonarCloud (push) Failing after 4s
Build Test / build-linux-binary (push) Failing after -3m59s
sync2gitee / repo-sync (push) Failing after 2s

This commit is contained in:
ssongliu 2024-05-10 14:56:24 +08:00 committed by GitHub
parent d5c75f4eee
commit df53193f3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,11 @@ func (u *UpgradeService) Upgrade(req dto.Upgrade) error {
return err
}
downloadPath := fmt.Sprintf("%s/%s/%s/release", global.CONF.System.RepoUrl, global.CONF.System.Mode, req.Version)
mode := global.CONF.System.Mode
if strings.Contains(req.Version, "beta") {
mode = "beta"
}
downloadPath := fmt.Sprintf("%s/%s/%s/release", global.CONF.System.RepoUrl, mode, req.Version)
fileName := fmt.Sprintf("1panel-%s-%s-%s.tar.gz", req.Version, "linux", itemArch)
_ = settingRepo.Update("SystemStatus", "Upgrading")
go func() {