Repository navigation
Replace dashes in FreeType version - #10406
Merged
Merged
Conversation
Member
|
We'd also need to replace dashes in a third consumer, in Here's a possible alternative to fix it in the producer, in Renovate, something like this: diff --git a/.github/renovate.json b/.github/renovate.json
index f26109f29..42e260f7b 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -11,6 +11,14 @@
"schedule": [
"* * 3 * *"
],
+ "customDatasources": {
+ "freetype": {
+ "defaultRegistryUrlTemplate": "https://gitlab.freedesktop.org/api/v4/projects/freetype%2Ffreetype/repository/tags?per_page=100",
+ "transformTemplates": [
+ "{\"releases\": $map($[$match(name, /^VER-\\d+-\\d+-\\d+$/)], function($tag) { {\"version\": $replace($substringAfter($tag.name, \"VER-\"), \"-\", \".\"), \"releaseTimestamp\": $tag.created_at} }), \"sourceUrl\": \"https://gitlab.freedesktop.org/freetype/freetype\"}"
+ ]
+ }
+ },
"customManagers": [
{
"customType": "regex",
@@ -35,11 +43,8 @@
"managerFilePatterns": ["/^\\.github/dependencies\\.json$/"],
"matchStrings": ["\"freetype\":\\s*\"(?<currentValue>\\d+[^\"]*)\""],
"depNameTemplate": "freetype",
- "packageNameTemplate": "freetype/freetype",
- "datasourceTemplate": "gitlab-tags",
- "registryUrlTemplate": "https://gitlab.freedesktop.org",
- "extractVersionTemplate": "^VER-(?<version>[\\d-]+)$",
- "versioningTemplate": "regex:^(?<major>\\d+)[.-](?<minor>\\d+)[.-](?<patch>\\d+)$"
+ "datasourceTemplate": "custom.freetype",
+ "versioningTemplate": "semver"
},
{
"customType": "regex",A benefit would be that I don't have a strong preference, which would you prefer? |
Member
Author
|
My preference would be for the current strategy - while the changes are more scattered, it's still simpler overall, and doesn't involve a third-party schema anymore than we need to. |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#10396 initially tried updating FreeType to '2-15-0', because that the tag at https://gitlab.freedesktop.org/freetype/freetype/-/tags is 'VER-2-15-0'. For today, I manually updated the PR with '2.15.0'
As for a better long-term solution, my attempts to persuade Renovate to replace dashes with dots were unsuccessful, and judging from renovatebot/renovate#38698, this is an open problem. What if instead, we let Renovate write the dashed version in dependencies.json, and replace the dashes when we extract the version?