Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions bucket/pingo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "1.25.3-6abbb",
"description": "Image optimizer for web",
"homepage": "https://css-ig.net/pingo",
"license": {
"identifier": "Unknown",
"url": "https://css-ig.net/submit/licenses"
},
"url": "https://css-ig.net/bin/pingo-win64.zip",
"hash": "6abbbcd61635497b424a3045723d9ea4c0a5e690006f7b6392cc7d78bce43360",
"bin": "pingo.exe",
"checkver": {
"script": [
"<#",
" Create version with first 5ch of SHA256 checksum,",
" because the author have multiple times updated the ZIP file,",
" without incrementing the version number.",
"#>",
"# Get stated version from webpage",
"$Html = Invoke-RestMethod -Method 'Get' -Uri 'https://css-ig.net/pingo'",
"$Version = [string] [regex]::Matches($Html, 'v([\\d+.]+)')[0].'Value'.TrimStart('v')",
"# Get SHA256 checksum",
"$WebClient = [System.Net.WebClient]::new()",
"$Sha256 = [string](",
" (Get-FileHash -InputStream ($WebClient.OpenRead('https://css-ig.net/bin/pingo-win64.zip')) -Algorithm 'SHA256').'Hash'.ToLower()",
")",
"if ($null -ne $WebClient) {",
" $WebClient.Dispose()",
"}",
"# Output stated version with first 5 characters of the SHA256 checksum",
"[string]::Format('{0}-{1}', $Version, $Sha256.Substring(0, 5))"
],
"regex": "([\\d+.]+-[\\da-f]{5})"
},
"autoupdate": {
"url": "https://css-ig.net/bin/pingo-win64.zip"
}
}