Livecheck regex with version in url path

Steven Smith steve.t.smith at gmail.com
Mon Dec 23 21:01:26 UTC 2019


For example, this livecheck produces the following error:

livecheck.type      regex   
livecheck.url       https://downloads.haskell.org/~${name}
livecheck.regex     (\\d+(?:\\.\\d+){1,3})

DEBUG: Executing org.macports.livecheck (ghc)
DEBUG: Port (livecheck) version is 8.8.1
DEBUG: Fetching https://downloads.haskell.org/~ghc
DEBUG: Using CURL options "--append-http-header" "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
DEBUG: The regex is "(\d+(?:\.\d+){1,3})"
Error: cannot check if ghc was updated (regex didn't match)

Using a Kleene star ‘*’ regex pattern instead of ‘{1,3}’ generates an infinite loop upon doing a livecheck.


> On Dec 23, 2019, at 15:36, Steven Smith <steve.t.smith at gmail.com> wrote:
> 
> 
>> you need to find a URL that doesn't contain the version number for MacPorts to download. For ghc, https://downloads.haskell.org/~ghc/ looks like a reasonable URL to use. Of course you'll have to change the regex to match directories rather than files.
> 
> Would you or someone please provide a one-liner on how to do that? The stuff I’ve tried hasn’t worked.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3898 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20191223/61222d14/attachment-0001.bin>


More information about the macports-dev mailing list