mirror of
				https://github.com/ScoopInstaller/Main.git
				synced 2025-11-03 23:31:20 +00:00 
			
		
		
		
	refreshenv: Remove checkver
There was a bug in the checkver which lead to random version numbers. Moreover, the script is unlikely to receive any updates (last one was two years ago). Closes #5440
This commit is contained in:
		
							parent
							
								
									58b35669f2
								
							
						
					
					
						commit
						bf05cc43bf
					
				@ -5,20 +5,5 @@
 | 
			
		||||
    "license": "Apache-2.0",
 | 
			
		||||
    "url": "https://raw.githubusercontent.com/chocolatey/choco/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd",
 | 
			
		||||
    "hash": "8b6b1d8f6bfab3dc9fbee30d6b2f3093ea3eccd5c66e57161dbe1b8f703fa74c",
 | 
			
		||||
    "bin": "RefreshEnv.cmd",
 | 
			
		||||
    "checkver": {
 | 
			
		||||
        "script": [
 | 
			
		||||
            "# Using script to get version number from date, e.g. 6 Mar, 2019 -> 2019.03.06",
 | 
			
		||||
            "$url = 'https://github.com/chocolatey/choco/commits/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd'",
 | 
			
		||||
            "$regex = 'Commits on ([\\w\\s,]+)</h2>'",
 | 
			
		||||
            "$cont = $(Invoke-WebRequest $url).Content",
 | 
			
		||||
            "if(!($cont -match $regex)) { error \"Could match '$regex' on '$url'\"; return }",
 | 
			
		||||
            "$script_ver = $(Get-Date $matches[1]).ToString('yyyy.MM.dd')",
 | 
			
		||||
            "Write-Output $script_ver"
 | 
			
		||||
        ],
 | 
			
		||||
        "regex": "([\\d.]+)"
 | 
			
		||||
    },
 | 
			
		||||
    "autoupdate": {
 | 
			
		||||
        "url": "https://raw.githubusercontent.com/chocolatey/choco/HEAD/src/chocolatey.resources/redirects/RefreshEnv.cmd"
 | 
			
		||||
    }
 | 
			
		||||
    "bin": "RefreshEnv.cmd"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user