mirror of
https://github.com/cmderdev/cmder.git
synced 2026-04-14 22:04:32 +08:00
Make sure downgrades don't show up as updates
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -324,13 +324,19 @@ foreach ($s in $sources) {
|
||||
$oldVer = [System.Version]::Parse($oldVerParseable)
|
||||
$newVer = [System.Version]::Parse($newVerParseable)
|
||||
|
||||
if ($newVer.Major -gt $oldVer.Major) {
|
||||
if ($newVer -lt $oldVer) {
|
||||
$changeType = "downgrade"
|
||||
$hasBreakingChanges = $true
|
||||
} elseif ($newVer.Major -gt $oldVer.Major) {
|
||||
$changeType = "major"
|
||||
$hasBreakingChanges = $true
|
||||
} elseif ($newVer.Minor -gt $oldVer.Minor) {
|
||||
$changeType = "minor"
|
||||
} else {
|
||||
} elseif ($newVer.Build -gt $oldVer.Build) {
|
||||
$changeType = "patch"
|
||||
} else {
|
||||
# No version increase detected (could be equal or non-incremental change)
|
||||
$changeType = "unknown"
|
||||
}
|
||||
} else {
|
||||
# Not enough numeric parts for semantic versioning
|
||||
|
||||
Reference in New Issue
Block a user