ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.6k stars 968 forks source link

sget: Excavator failing to update, but checkver works locally #3453

Closed tech189 closed 2 years ago

tech189 commented 2 years ago

sget is stuck at version 1.5.0 when 1.6.0 is available. I can run checkver locally to update it with no problem, but can't work out why the Excavator log says sget: couldn't match '\/releases\/tag\/(?:v|V)?([\d.]+)' in https://api.github.com/repos/sigstore/cosign#sget/releases/latest.

My local update log:

~\scoop config debug $true && pwsh -Command "C:\Users\me\scoop\apps\scoop\current\bin\checkver.ps1" sget -Dir C:\Users\me\scoop\buckets\testing -f && scoop config debug $false
'debug' has been set to 'True'
sget: 1.6.0 (scoop version is 1.5.0) autoupdate available
Forcing autoupdate!
Autoupdating sget
DEBUG[1648470246] [$updatedProperties] = [hash url] -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:444:5
DEBUG[1648470246] $substitutions (hashtable) -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:182:5
DEBUG[1648470246] $substitutions.$version                       1.6.0
DEBUG[1648470246] $substitutions.$basename                      sget-windows-amd64.exe
DEBUG[1648470246] $substitutions.$basenameNoExt                 sget-windows-amd64
DEBUG[1648470246] $substitutions.$url                           https://github.com/sigstore/cosign/releases/download/v1.6.0/sget-windows-amd64.exe
DEBUG[1648470246] $substitutions.$match1                        1.6.0
DEBUG[1648470246] $substitutions.$dashVersion                   1-6-0
DEBUG[1648470246] $substitutions.$urlNoExt                      https://github.com/sigstore/cosign/releases/download/v1.6.0/sget-windows-amd64
DEBUG[1648470246] $substitutions.$underscoreVersion             1_6_0
DEBUG[1648470246] $substitutions.$patchVersion                  0
DEBUG[1648470246] $substitutions.$buildVersion
DEBUG[1648470246] $substitutions.$minorVersion                  6
DEBUG[1648470246] $substitutions.$matchTail
DEBUG[1648470246] $substitutions.$cleanVersion                  160
DEBUG[1648470246] $substitutions.$matchHead                     1.6.0
DEBUG[1648470246] $substitutions.$majorVersion                  1
DEBUG[1648470246] $substitutions.$dotVersion                    1.6.0
DEBUG[1648470246] $substitutions.$baseurl                       https://github.com/sigstore/cosign/releases/download/v1.6.0
DEBUG[1648470246] $substitutions.$preReleaseVersion             1.6.0
DEBUG[1648470246] $hashfile_url = https://github.com/sigstore/cosign/releases/download/v1.6.0/cosign_checksums.txt -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:185:5
Searching hash for sget-windows-amd64.exe in https://github.com/sigstore/cosign/releases/download/v1.6.0/cosign_checksums.txt
DEBUG[1648470247] $regex = (?im)^([a-fA-F0-9]{64})\s+sget-windows-amd64\.exe$ -> C:\Users\me\scoop\apps\scoop\current\lib\autoupdate.ps1:57:5
Found: d71c58e54cb1c6cd03ad72180ca5d1552d2d8901814a67c574548e932d9f961d using Extract Mode
Writing updated sget manifest
'debug' has been set to 'False'

~\scoop took 4s

Any ideas? If not, then the following can be used instead:

"checkver": {
        "url": "https://github.com/sigstore/cosign/releases",
        "regex": "tree\\/v([\\d.]+)"
    },
rashil2000 commented 2 years ago

Can you make a PR with the new regex? We'll see if the automated test picks it up correctly