mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 00:12:42 +08:00
🎨 Improve marketplace package update validation https://github.com/siyuan-note/siyuan/issues/14586
This commit is contained in:
parent
4e0dd6120c
commit
946869ce41
@ -532,7 +532,7 @@ func isOutdatedTheme(theme *Theme, bazaarThemes []*Theme) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pkg := range bazaarThemes {
|
for _, pkg := range bazaarThemes {
|
||||||
if theme.URL == pkg.URL && theme.Name == pkg.Name && theme.Author == pkg.Author && 0 > semver.Compare("v"+theme.Version, "v"+pkg.Version) {
|
if theme.URL == pkg.URL && theme.Name == pkg.Name && 0 > semver.Compare("v"+theme.Version, "v"+pkg.Version) {
|
||||||
theme.RepoHash = pkg.RepoHash
|
theme.RepoHash = pkg.RepoHash
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -552,7 +552,7 @@ func isOutdatedIcon(icon *Icon, bazaarIcons []*Icon) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pkg := range bazaarIcons {
|
for _, pkg := range bazaarIcons {
|
||||||
if icon.URL == pkg.URL && icon.Name == pkg.Name && icon.Author == pkg.Author && 0 > semver.Compare("v"+icon.Version, "v"+pkg.Version) {
|
if icon.URL == pkg.URL && icon.Name == pkg.Name && 0 > semver.Compare("v"+icon.Version, "v"+pkg.Version) {
|
||||||
icon.RepoHash = pkg.RepoHash
|
icon.RepoHash = pkg.RepoHash
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -572,7 +572,7 @@ func isOutdatedPlugin(plugin *Plugin, bazaarPlugins []*Plugin) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pkg := range bazaarPlugins {
|
for _, pkg := range bazaarPlugins {
|
||||||
if plugin.URL == pkg.URL && plugin.Name == pkg.Name && plugin.Author == pkg.Author && 0 > semver.Compare("v"+plugin.Version, "v"+pkg.Version) {
|
if plugin.URL == pkg.URL && plugin.Name == pkg.Name && 0 > semver.Compare("v"+plugin.Version, "v"+pkg.Version) {
|
||||||
plugin.RepoHash = pkg.RepoHash
|
plugin.RepoHash = pkg.RepoHash
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -592,7 +592,7 @@ func isOutdatedWidget(widget *Widget, bazaarWidgets []*Widget) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pkg := range bazaarWidgets {
|
for _, pkg := range bazaarWidgets {
|
||||||
if widget.URL == pkg.URL && widget.Name == pkg.Name && widget.Author == pkg.Author && 0 > semver.Compare("v"+widget.Version, "v"+pkg.Version) {
|
if widget.URL == pkg.URL && widget.Name == pkg.Name && 0 > semver.Compare("v"+widget.Version, "v"+pkg.Version) {
|
||||||
widget.RepoHash = pkg.RepoHash
|
widget.RepoHash = pkg.RepoHash
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -612,7 +612,7 @@ func isOutdatedTemplate(template *Template, bazaarTemplates []*Template) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, pkg := range bazaarTemplates {
|
for _, pkg := range bazaarTemplates {
|
||||||
if template.URL == pkg.URL && template.Name == pkg.Name && template.Author == pkg.Author && 0 > semver.Compare("v"+template.Version, "v"+pkg.Version) {
|
if template.URL == pkg.URL && template.Name == pkg.Name && 0 > semver.Compare("v"+template.Version, "v"+pkg.Version) {
|
||||||
template.RepoHash = pkg.RepoHash
|
template.RepoHash = pkg.RepoHash
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user