Skip to content

Commit

Permalink
fix: 解决安装包下载路径错误的问题 (#4954)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed May 10, 2024
1 parent d5c75f4 commit df53193
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/app/service/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit df53193

Please sign in to comment.