Skip to content

Commit b75eb8f

Browse files
committed
Fix version parsing for libmcrypt
1 parent 174713c commit b75eb8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extension/BuildPhpExtension/private/Get-PeclLibraryZip.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ function Get-PeclLibraryZip {
4949
if($null -eq $lib_version -or $matches[1] -match ('^' + $lib_version + '.*'))
5050
{
5151
if($link_matches[1].Contains('.')) { $suffix="" } else { $suffix=".0" }
52+
$versionParts = $link_matches[1] -split '-'
53+
if($null -ne $versionParts[1] -and $versionParts[1].Contains('.')) {
54+
$versionParts[0] = $versionParts[0] + $versionParts[1].Replace('.', '')
55+
}
5256
$options += @{
5357
name = ($_.HREF -split ('/') | Select-Object -Last 1)
54-
version = (($link_matches[1] -replace '-', '.') + $suffix)
58+
version = ($versionParts[0] + $suffix)
5559
}
5660
}
5761
}

0 commit comments

Comments
 (0)