Skip to content

Commit 0faa6d1

Browse files
committed
switch version checks to semver
1 parent b3924a3 commit 0faa6d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Modules/CIPPCore/Public/Assert-CippVersion.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ function Assert-CippVersion {
1414
$APIVersion = (Get-Content 'version_latest.txt' -Raw).trim()
1515

1616
$RemoteAPIVersion = (Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/KelvinTegelaar/CIPP-API/master/version_latest.txt').trim()
17-
$RemoteCIPPVersion = (Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/KelvinTegelaar/CIPP/master/public/version_latest.txt').trim()
17+
$RemoteCIPPVersion = (Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/KelvinTegelaar/CIPP/main/public/version_latest.txt').trim()
18+
1819

1920
[PSCustomObject]@{
2021
LocalCIPPVersion = $CIPPVersion
2122
RemoteCIPPVersion = $RemoteCIPPVersion
2223
LocalCIPPAPIVersion = $APIVersion
2324
RemoteCIPPAPIVersion = $RemoteAPIVersion
24-
OutOfDateCIPP = ([version]$RemoteCIPPVersion -gt [version]$CIPPVersion)
25-
OutOfDateCIPPAPI = ([version]$RemoteAPIVersion -gt [version]$APIVersion)
25+
OutOfDateCIPP = ([semver]$RemoteCIPPVersion -gt [semver]$CIPPVersion)
26+
OutOfDateCIPPAPI = ([semver]$RemoteAPIVersion -gt [semver]$APIVersion)
2627
}
2728
}

0 commit comments

Comments
 (0)