diff --git a/CHANGELOG.md b/CHANGELOG.md index 3795ce5dc3..59d6f9217b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ - **buckets|scoop-info:** Switch git log date format to ISO 8601 to avoid locale issues ([#6446](https://github.com/ScoopInstaller/Scoop/issues/6446)) - **scoop-version:** Fix logic error caused by missing brackets ([#6463](https://github.com/ScoopInstaller/Scoop/issues/6463)) +### Features + +**checkver**: Add GitLab to `checkver` ([#5508](https://github.com/ScoopInstaller/Scoop/issues/5508)) + ## [v0.5.3](https://github.com/ScoopInstaller/Scoop/compare/v0.5.2...v0.5.3) - 2025-08-11 ### Features diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index 33a4449488..f1bed57c1c 100644 --- a/bin/checkver.ps1 +++ b/bin/checkver.ps1 @@ -162,6 +162,24 @@ $Queue | ForEach-Object { if ($json.checkver.PSObject.Properties.Count -eq 1) { $useGithubAPI = $true } } + # GitLab + if ($regex) { + $gitlabRegex = $regex + } else { + $gitlabRegex = '/-/releases/(?:v|V)?([\d.]+)' + } + if ($json.checkver -eq 'gitlab') { + if (!$json.homepage.StartsWith('https://gitlab.com/')) { + error "$name checkver expects the homepage to be a GitLab repository" + } + $url = $json.checkver.gitlab.TrimEnd('/') + '/-/releases?format=atom' + $regex = $gitlabRegex + } + if ($json.checkver.gitlab) { + $url = $json.checkver.gitlab.TrimEnd('/') + '/-/releases?format=atom' + $regex = $gitlabRegex + } + # SourceForge if ($regex) { $sourceforgeRegex = $regex diff --git a/schema.json b/schema.json index 6c24d4da20..af51c94d0a 100644 --- a/schema.json +++ b/schema.json @@ -292,6 +292,10 @@ "format": "uri", "type": "string" }, + "gitlab": { + "format": "uri", + "type": "string" + }, "re": { "format": "regex", "type": "string",