fix: support variable-length hashes in spotify versions

This commit is contained in:
amd64fox
2026-10-07 20:55:31 +03:00
parent 0447e6eb03
commit 0572e09a3e
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ jobs:
}
$spotifyVersion = [string]$latestEntry.Value.fullversion
if ([string]::IsNullOrWhiteSpace($spotifyVersion) -or $spotifyVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
if ([string]::IsNullOrWhiteSpace($spotifyVersion) -or $spotifyVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
throw "Invalid Spotify fullversion for $($latestEntry.Name)"
}
}
@@ -93,7 +93,7 @@ jobs:
if (-not $installer.url -or $installer.size -le 0) {
throw "No ARM64 installer found for Spotify $checkVersion"
}
if ($entry.Value.fullversion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
if ($entry.Value.fullversion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
throw "Invalid Spotify fullversion for $checkVersion"
}
+3 -3
View File
@@ -489,7 +489,7 @@ function Get-SpotifyVersionNumber {
[string]$SpotifyVersion
)
return [Version]($SpotifyVersion -replace '\.g[0-9a-f]{8}$', '')
return [Version]($SpotifyVersion -replace '\.g[0-9a-f]+$', '')
}
function Get-SpotifyInstallerArchitecture {
@@ -579,7 +579,7 @@ function Resolve-SpotifyInstallerVersionFromManifest {
$entry = $selectedVersion.Value
$fullVersion = [string]$entry.fullversion
if ($fullVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]{8}$') {
if ($fullVersion -notmatch '^\d+\.\d+\.\d+\.\d+\.g[0-9a-f]+$') {
throw "Spotify version $($selectedVersion.Name) has invalid fullversion in versions manifest"
}
@@ -621,7 +621,7 @@ $spotifyTemporaryDownloadVersion = "1.2.86.502.g8cd7fb22"
$spotifyVersionsManifestUrl = Get-Link -e "/table/versions.json" -Owner "LoaderSpot" -Repository "table"
$systemArchitecture = Get-SystemArchitecture
$match_v = "^(?<version>\d+\.\d+\.\d+(?:\.\d+(?:\.g[0-9a-f]{8})?)?)(?:-\d+)?$"
$match_v = "^(?<version>\d+\.\d+\.\d+(?:\.\d+(?:\.g[0-9a-f]+)?)?)(?:-\d+)?$"
$versionIsSupported = $false
if ($version) {
if ($version -match $match_v) {