ScoopInstaller / Main

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

[Bug]: erlang checkver doesn't get the latest version #5119

Closed MMKubicki closed 11 months ago

MMKubicki commented 12 months ago

Prerequisites

Package Name

erlang

Expected/Current Behaviour

The latest version of erlang is 26.1 (released yesterday), but the bucket only contains version 25.3.2.6.

Steps to Reproduce

PS> cd scoop\buckets\main
PS> .\bin\checkver.ps1 -App erlang
erlang: 25.3.2.6

Possible Solution

The currently used "checkver.url": "https://erlang.org/download/otp_versions_tree_app_vsns.html" has an older version as first match for the current regex instead of the latest.

A solution would be to use the download page on the homepage to get the latest version:

"checkver": {
    "url": "https://www.erlang.org/downloads",
    "regex": "https:\\/\\/github.com\\/erlang\\/otp\\/releases\\/download\\/OTP-([\\d.]+)\\/otp_win64_\\1\\.exe"
},

The regex looks for the link of the "Download Windows installer"-Button. The pattern is equal to the url currently used in autoupdate.

If needed I can submit a PR.

Scoop and Buckets Version

PS> scoop --version
Current Scoop version:
v0.3.1 - Released at 2022-11-15

'main' bucket:
b95ea969b (HEAD -> master, origin/master, origin/HEAD) twilio-cli: Update to version 5.15.0

Scoop Config

not needed

PowerShell Version

not needed

Additional Softwares

nothing

rashil2000 commented 11 months ago

Can you make a PR for the fix?