diff --git a/bucket/pingo.json b/bucket/pingo.json new file mode 100644 index 0000000000000..4f9a6b4f2a16d --- /dev/null +++ b/bucket/pingo.json @@ -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" + } +}