40 lines
1.7 KiB
JSON

{
"version": "5.5.0",
"description": "Pester is a test and mock framework for PowerShell.",
"homepage": "https://pester.dev",
"license": "Apache-2.0",
"notes": [
"'Pester' is currently installed as a PS module",
"For more information, visit: 'https://pester.dev/docs/quick-start'"
],
"url": "https://globalcdn.nuget.org/packages/pester.5.5.0.nupkg",
"hash": "805c1fe7187750b36ed8e2f751f3d1ab49b343f003c6ae1c303d8f02dc7d074e",
"extract_dir": "tools",
"psmodule": {
"name": "Pester"
},
"checkver": {
"script": [
"# Using checkver script to check through all release tags",
"$auth = Get-GitHubToken",
"$head = @{}",
"if($auth) { $head.add('authorization', \"Bearer $auth\") }",
"$url = 'https://api.github.com/repositories/1213474/releases'",
"$latest_ver = [Version]::new(0,0,0,0) # note: Powershell 5 does not support casting 'int' or 'float' to 'System.Version'",
"$releases = $(Invoke-WebRequest -Headers $head $url).Content | ConvertFrom-Json",
"$releases | ForEach-Object {",
" if (!($_.tag_name -match '([\\d.]+)')) { return }",
" if ($_.prerelease) { return }",
" $ver = [Version]::new($matches[1])",
" if ($ver -gt $latest_ver) { $latest_ver = $ver }",
"}",
"if ($latest_ver -eq [Version]::new(0,0,0,0)) { error \"Could not match version string in '$url'\"; continue }",
"Write-Output $latest_ver"
],
"regex": "([\\d.]+)"
},
"autoupdate": {
"url": "https://globalcdn.nuget.org/packages/pester.$version.nupkg"
}
}