chore: Fix checkver.script (#4491)

* chore: Fix `checkver.script`

* trid: Add comment

---------

Co-authored-by: Rashil Gandhi <rashil2000@gmail.com>
This commit is contained in:
Hsiao-nan Cheung 2023-02-28 19:25:59 +08:00 committed by GitHub
parent e07a085610
commit e812d3c0e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -28,7 +28,7 @@
" $ver = [Version]::new($matches[1])", " $ver = [Version]::new($matches[1])",
" if ($ver -gt $latest_ver) { $latest_ver = $ver }", " 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 }", "if ($latest_ver -eq [Version]::new(0,0,0,0)) { error \"Could not match version string in '$url'\"; continue }",
"Write-Output $latest_ver" "Write-Output $latest_ver"
], ],
"regex": "([\\d.]+)" "regex": "([\\d.]+)"

View File

@ -25,7 +25,7 @@
" $ver = [Version]::new($matches[1])", " $ver = [Version]::new($matches[1])",
" if ($ver -gt $latest_ver) { $latest_ver = $ver }", " 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 }", "if ($latest_ver -eq [Version]::new(0,0,0,0)) { error \"Could not match version string in '$url'\"; continue }",
"Write-Output $latest_ver" "Write-Output $latest_ver"
], ],
"regex": "([\\d.]+)" "regex": "([\\d.]+)"

View File

@ -60,13 +60,13 @@
"$libpng_page = (Invoke-WebRequest \"${base_url}mingw-w64-libpng\" -UseBasicParsing).Content", "$libpng_page = (Invoke-WebRequest \"${base_url}mingw-w64-libpng\" -UseBasicParsing).Content",
"$zlib_page = (Invoke-WebRequest \"${base_url}mingw-w64-zlib\" -UseBasicParsing).Content", "$zlib_page = (Invoke-WebRequest \"${base_url}mingw-w64-zlib\" -UseBasicParsing).Content",
"", "",
"if(!($qrencode_page -match $version_regex)) { error \"No match found for version\"; break }", "if(!($qrencode_page -match $version_regex)) { error \"No match found for version\"; continue }",
"$scriptver = $matches[1]", "$scriptver = $matches[1]",
"if(!($libwinpthread_page -match \"(?:\\d+.){3}(?:\\w+.){2}-\\d+\")) { error \"No match found for version\"; break }", "if(!($libwinpthread_page -match \"(?:\\d+.){3}(?:\\w+.){2}-\\d+\")) { error \"No match found for version\"; continue }",
"$libwinpthread_version = $matches[0]", "$libwinpthread_version = $matches[0]",
"if(!($libpng_page -match $version_regex)) { error \"No match found for version\"; break }", "if(!($libpng_page -match $version_regex)) { error \"No match found for version\"; continue }",
"$libpng_version = $matches[1]", "$libpng_version = $matches[1]",
"if(!($zlib_page -match $version_regex)) { error \"No match found for version\"; break }", "if(!($zlib_page -match $version_regex)) { error \"No match found for version\"; continue }",
"$zlib_version = $matches[1]", "$zlib_version = $matches[1]",
"", "",
"Write-Output $scriptver $libwinpthread_version $libpng_version $zlib_version" "Write-Output $scriptver $libwinpthread_version $libpng_version $zlib_version"

View File

@ -1,4 +1,5 @@
{ {
"##": "Autoupdate only updates TrID Definitions. If the main program updates, please change hashes manually",
"version": "2.24-23.02.28", "version": "2.24-23.02.28",
"description": "A utility designed to identify file types from their binary signatures.", "description": "A utility designed to identify file types from their binary signatures.",
"homepage": "https://www.mark0.net/soft-trid-e.html", "homepage": "https://www.mark0.net/soft-trid-e.html",
@ -17,7 +18,6 @@
"replace": "${1}-${4}.${3}.${2}" "replace": "${1}-${4}.${3}.${2}"
}, },
"autoupdate": { "autoupdate": {
"note": "Autoupdate only updates TrID Definitions. If the main program updates, please change hashes manually",
"url": "https://mark0.net/download/triddefs.zip" "url": "https://mark0.net/download/triddefs.zip"
} }
} }