Skip to content

php74-nts: add version 7.4.33#1121

Open
Baneeishaque wants to merge 1 commit intoScoopInstaller:masterfrom
Baneeishaque:php74-nts
Open

php74-nts: add version 7.4.33#1121
Baneeishaque wants to merge 1 commit intoScoopInstaller:masterfrom
Baneeishaque:php74-nts

Conversation

@Baneeishaque
Copy link
Contributor

Comment on lines +47 to +69
"checkver": {
"script": [
"$latestVersion = Select-String -InputObject $(Invoke-WebRequest \"https://windows.php.net/download/\").Content -Pattern \"php-(7\\.4\\.\\d+)-nts-Win32-(v.\\d+)+-x86\\.zip\" | Foreach-Object { $_.Matches }",
"if ($null -eq $latestVersion) {",
"$latestArchievedVersion = $(Select-String -InputObject $(Invoke-WebRequest \"https://windows.php.net/downloads/releases/archives/\").Content -Pattern \"php-(7\\.4\\.\\d+)-nts-Win32-(v.\\d+)+-x86\\.zip\" -AllMatches | Foreach-Object { $_.Matches } | Get-Unique | Sort-Object { [System.Version]$_.Groups[1].Value })[-1]",
"Write-Output \"$($latestArchievedVersion.Groups[1].Value) $($latestArchievedVersion.Groups[2].Value) archives/php\"",
"}",
"else {",
"Write-Output \"$($latestVersion.Groups[1].Value) $($latestVersion.Groups[2].Value) php\"",
"}"
],
"regex": "(?<version>[\\d.]+) (?<build>.+) (?<past>.+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://windows.php.net/downloads/releases/$matchPast-$version-nts-Win32-$matchBuild-x64.zip"
},
"32bit": {
"url": "https://windows.php.net/downloads/releases/$matchPast-$version-nts-Win32-$matchBuild-x86.zip"
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"checkver": {
"script": [
"$latestVersion = Select-String -InputObject $(Invoke-WebRequest \"https://windows.php.net/download/\").Content -Pattern \"php-(7\\.4\\.\\d+)-nts-Win32-(v.\\d+)+-x86\\.zip\" | Foreach-Object { $_.Matches }",
"if ($null -eq $latestVersion) {",
"$latestArchievedVersion = $(Select-String -InputObject $(Invoke-WebRequest \"https://windows.php.net/downloads/releases/archives/\").Content -Pattern \"php-(7\\.4\\.\\d+)-nts-Win32-(v.\\d+)+-x86\\.zip\" -AllMatches | Foreach-Object { $_.Matches } | Get-Unique | Sort-Object { [System.Version]$_.Groups[1].Value })[-1]",
"Write-Output \"$($latestArchievedVersion.Groups[1].Value) $($latestArchievedVersion.Groups[2].Value) archives/php\"",
"}",
"else {",
"Write-Output \"$($latestVersion.Groups[1].Value) $($latestVersion.Groups[2].Value) php\"",
"}"
],
"regex": "(?<version>[\\d.]+) (?<build>.+) (?<past>.+)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://windows.php.net/downloads/releases/$matchPast-$version-nts-Win32-$matchBuild-x64.zip"
},
"32bit": {
"url": "https://windows.php.net/downloads/releases/$matchPast-$version-nts-Win32-$matchBuild-x86.zip"
}
}
}
"checkver": {
"url": "https://windows.php.net/downloads/releases/releases.json",
"jsonpath": "$['7.4'].version"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://windows.php.net/downloads/releases/php-$version-nts-Win32-VC15-x64.zip"
},
"32bit": {
"url": "https://windows.php.net/downloads/releases/php-$version-nts-Win32-VC15-x86.zip"
}
},
"hash": {
"url": "$baseurl/sha256sum.txt"
}
}

This simple checkver/autoupdate works, and fix it when php 7.4 is moved to archive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants