🎨 Improve upgrade download URLs
This commit is contained in:
parent
743737d39f
commit
d661dceb8f
1 changed files with 4 additions and 1 deletions
|
@ -131,16 +131,19 @@ func getUpdatePkg() (downloadPkgURLs []string, checksum string, err error) {
|
|||
}
|
||||
pkg := "siyuan-" + ver + "-" + suffix
|
||||
|
||||
b3logURL := "https://release.liuyun.io/siyuan/" + pkg
|
||||
b3logURL := "https://release.b3log.org/siyuan/" + pkg
|
||||
liuyunURL := "https://release.liuyun.io/siyuan/" + pkg
|
||||
githubURL := "https://github.com/siyuan-note/siyuan/releases/download/v" + ver + "/" + pkg
|
||||
ghproxyURL := "https://mirror.ghproxy.com/" + githubURL
|
||||
if util.IsChinaCloud() {
|
||||
downloadPkgURLs = append(downloadPkgURLs, b3logURL)
|
||||
downloadPkgURLs = append(downloadPkgURLs, liuyunURL)
|
||||
downloadPkgURLs = append(downloadPkgURLs, ghproxyURL)
|
||||
downloadPkgURLs = append(downloadPkgURLs, githubURL)
|
||||
} else {
|
||||
downloadPkgURLs = append(downloadPkgURLs, githubURL)
|
||||
downloadPkgURLs = append(downloadPkgURLs, b3logURL)
|
||||
downloadPkgURLs = append(downloadPkgURLs, liuyunURL)
|
||||
}
|
||||
|
||||
checksums := result["checksums"].(map[string]interface{})
|
||||
|
|
Loading…
Add table
Reference in a new issue