mirror of
				https://github.com/ScoopInstaller/Main.git
				synced 2025-11-04 07:41:20 +00:00 
			
		
		
		
	* Add checkver script that checks all release tags (similar to `main/pnpm`) * Pester mixes ver4 and ver5 in their releases. This will prevent the "wrong revert" error preemptively.
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
{
 | 
						|
    "version": "5.3.3",
 | 
						|
    "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.3.3.nupkg",
 | 
						|
    "hash": "654cb63a916dbce388babf8c80f63cae4ff0b4b8997e83e78f8fa93a9a07a1b5",
 | 
						|
    "extract_dir": "tools",
 | 
						|
    "psmodule": {
 | 
						|
        "name": "Pester"
 | 
						|
    },
 | 
						|
    "checkver": {
 | 
						|
        "script": [
 | 
						|
            "# Using checkver script to check through all release tags",
 | 
						|
            "$url = 'https://api.github.com/repos/pester/Pester/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 $url).Content | ConvertFrom-Json",
 | 
						|
            "$releases | ForEach-Object {",
 | 
						|
            "    if (!($_.tag_name -match '([\\d.]+)')) { 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'\"; break }",
 | 
						|
            "Write-Output $latest_ver"
 | 
						|
        ],
 | 
						|
        "regex": "([\\d.]+)"
 | 
						|
    },
 | 
						|
    "autoupdate": {
 | 
						|
        "url": "https://globalcdn.nuget.org/packages/pester.$version.nupkg"
 | 
						|
    }
 | 
						|
}
 |