Skip to content

trid: Simplify checkver regex#7912

Merged
z-Fng merged 1 commit intoScoopInstaller:masterfrom
SorYoshino:trid
May 1, 2026
Merged

trid: Simplify checkver regex#7912
z-Fng merged 1 commit intoScoopInstaller:masterfrom
SorYoshino:trid

Conversation

@SorYoshino
Copy link
Copy Markdown
Contributor

Summary

Refactors the trid manifest to use the standard installer block and improves the checkver regex for more robust version parsing.

Changes

  • Migrate extraction logic from pre_install to installer.script for better manifest structure
  • Update checkver regex to support 64-bit strings and implement named capture groups (day, month, year)
  • Refine regex flags to (?si) and ensure the versioning scheme matches the expected format

Testing

The test results are as follows:
┏[ D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Main][ trid ≢  ~1]
└─> .\bin\checkver.ps1 -App '.\bucket\trid.json' -f
trid: 2.47-26.04.30 (scoop version is 2.47-26.04.30)
Forcing autoupdate!
Autoupdating trid
DEBUG[1777622849] [$updatedProperties] = [url hash] -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:500:5
DEBUG[1777622849] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1777622849] $substitutions.$matchHead                     2.47
DEBUG[1777622849] $substitutions.$matchTail                     -26.04.30
DEBUG[1777622849] $substitutions.$minorVersion                  47
DEBUG[1777622849] $substitutions.$baseurl                       https://www.mark0.net/download
DEBUG[1777622849] $substitutions.$majorVersion                  2
DEBUG[1777622849] $substitutions.$buildVersion                  
DEBUG[1777622849] $substitutions.$dashVersion                   2-47-26-04-30
DEBUG[1777622849] $substitutions.$underscoreVersion             2_47_26_04_30
DEBUG[1777622849] $substitutions.$version                       2.47-26.04.30
DEBUG[1777622849] $substitutions.$preReleaseVersion             26.04.30
DEBUG[1777622849] $substitutions.$dotVersion                    2.47.26.04.30
DEBUG[1777622849] $substitutions.$urlNoExt                      https://www.mark0.net/download/triddefs
DEBUG[1777622849] $substitutions.$matchDay                      30
DEBUG[1777622849] $substitutions.$cleanVersion                  247260430
DEBUG[1777622849] $substitutions.$basenameNoExt                 triddefs
DEBUG[1777622849] $substitutions.$basename                      triddefs.zip
DEBUG[1777622849] $substitutions.$match1                        2.47
DEBUG[1777622849] $substitutions.$patchVersion                  
DEBUG[1777622849] $substitutions.$url                           https://www.mark0.net/download/triddefs.zip
DEBUG[1777622849] $substitutions.$matchYear                     26
DEBUG[1777622849] $substitutions.$matchMonth                    04
DEBUG[1777622849] $hashfile_url = $null -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Downloading triddefs.zip to compute hashes!
Loading triddefs.zip from cache
Computed hash: bd38d1f77c8fe416f8addd5e2359c70247f2fa45c6178160e80fd5d772a98d73
DEBUG[1777622849] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1777622849] $substitutions.$matchHead                     2.47
DEBUG[1777622849] $substitutions.$matchTail                     -26.04.30
DEBUG[1777622849] $substitutions.$minorVersion                  47
DEBUG[1777622849] $substitutions.$baseurl                       https://www.mark0.net/download
DEBUG[1777622849] $substitutions.$majorVersion                  2
DEBUG[1777622849] $substitutions.$buildVersion                  
DEBUG[1777622849] $substitutions.$dashVersion                   2-47-26-04-30
DEBUG[1777622849] $substitutions.$underscoreVersion             2_47_26_04_30
DEBUG[1777622849] $substitutions.$version                       2.47-26.04.30
DEBUG[1777622849] $substitutions.$preReleaseVersion             26.04.30
DEBUG[1777622849] $substitutions.$dotVersion                    2.47.26.04.30
DEBUG[1777622849] $substitutions.$urlNoExt                      https://www.mark0.net/download/trid_win64
DEBUG[1777622849] $substitutions.$matchDay                      30
DEBUG[1777622849] $substitutions.$cleanVersion                  247260430
DEBUG[1777622849] $substitutions.$basenameNoExt                 trid_win64
DEBUG[1777622849] $substitutions.$basename                      trid_win64.zip
DEBUG[1777622849] $substitutions.$match1                        2.47
DEBUG[1777622849] $substitutions.$patchVersion                  
DEBUG[1777622849] $substitutions.$url                           https://www.mark0.net/download/trid_win64.zip
DEBUG[1777622849] $substitutions.$matchYear                     26
DEBUG[1777622849] $substitutions.$matchMonth                    04
DEBUG[1777622849] $hashfile_url = $null -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Downloading trid_win64.zip to compute hashes!
Loading trid_win64.zip from cache
Computed hash: 5683d49089d6f08312ad0736f47f212fbedd4a92af700eab34ee4b242e6060c3
Writing updated trid manifest
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@SorYoshino
Copy link
Copy Markdown
Contributor Author

/verify

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

All changes look good.

Wait for review from human collaborators.

trid

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Copy link
Copy Markdown
Member

@z-Fng z-Fng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@z-Fng z-Fng merged commit 431c885 into ScoopInstaller:master May 1, 2026
4 checks passed
@SorYoshino SorYoshino deleted the trid branch May 1, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants