Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

feat(autoupdate): add hash 'match' mode

Open T-727 opened this issue 1 year ago • 0 comments

Description

Setting autoupdate.hash to a string will make enter 'match' mode Which just substitutes matches and takes the final string as hash

Motivation and Context

Closes #5487

How Has This Been Tested?

by running `checkver` on the following manifest:
{
    "homepage": "https://github.com",
    "version": " ",
    "checkver": {
        "script": "Write-Output '#20514397D70D8FB99E021A5F28FBEBA3FC29814EC452EF1A3A3FCF42B08BB752'",
        "regex": "(#)(?<HASH>.+)"
    },
    "hash": "20514397d70d8fb99e021a5f28fbeba3fc29814ec452ef1a3a3fcf42b08bb752",
    "url": "https://github.com",
    "architecture": {
        "32bit": {
            "url": "https://github.com",
            "hash": "20514397d70d8fb99e021a5f28fbeba3fc29814ec452ef1a3a3fcf42b08bb752"
        }
    },
    "autoupdate": {
        "url": "https://github.com",
        "hash": "$matchHASH",
        "architecture": {
            "32bit": {
                "hash": "$matchHASH"
            }
        }
    }
}

Checklist:

  • [x] I have read the Contributing Guide.
  • [x] I have ensured that I am targeting the develop branch.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have updated the tests accordingly.
  • [ ] I have added an entry in the CHANGELOG.

T-727 avatar Jun 21 '23 10:06 T-727