-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: golang release version match #360
fix: golang release version match #360
Conversation
Golang major releases follow `major.minor` only and patch releases follow `major.minor.patch` format. This change allows renovate to update Golang major/patch release versions. This should also fix an old issue aquaproj#189. Signed-off-by: Noel Georgi <[email protected]>
Thank you for your contribution! |
I'll review this later. |
And this preset should not affect other than aqua related packages. |
this will skip rc versions, only stable versions will be used, this regex is also used internally at work https://github.com/siderolabs/tools/blob/main/.github/renovate.json#L38 |
Ahh, I see, to make sure only aqua managed files are only updated right?? |
Yes. |
cool, I'll update the PR in a while. |
Signed-off-by: Noel Georgi <[email protected]>
I've updated the PR and added as a second commit, if it's needed I can rebase and force-push |
Thank you for your update.
Not needed. Thanks. |
Only golang-go.json is updated and default.json isn't updated.
aqua-renovate-config/jsonnet/utils.libsonnet Lines 89 to 92 in db87981
But it's a bit complicated, so let me take a look. By Jsonnet we could write code comments and made the code DRY, but the code became a bit complicated... |
It works well. regexManagers: [
{
"datasourceTemplate": "github-tags",
"depNameTemplate": "golang/go",
"extractVersionTemplate": "^go(?<version>.*)$",
"fileMatch": [
"\\.?aqua\\.ya?ml"
],
"matchStrings": [
" +(?:version|'version'|\"version\") *: +(go)?(?<currentValue>[^'\" \\n]+) +# renovate: depName=golang/go[ \\n]",
" +(?:version|'version'|\"version\") *: +'(go)?(?<currentValue>[^'\" \\n]+)' +# renovate: depName=golang/go[ \\n]",
" +(?:version|'version'|\"version\") *: +\"(go)?(?<currentValue>[^'\" \\n]+)\" +# renovate: depName=golang/go[ \\n]",
" +(?:name|'name'|\"name\") *: +golang/go@(go)?(?<currentValue>[^'\" \\n]+)",
" +(?:name|'name'|\"name\") *: +'golang/go@(go)?(?<currentValue>[^'\" \\n]+)'",
" +(?:name|'name'|\"name\") *: +\"golang/go@(go)?(?<currentValue>[^'\" \\n]+)\""
],
"versioningTemplate": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.?(?<patch>\\d+)?$"
},
] |
We can configure versioning in regexManager. https://docs.renovatebot.com/configuration-options/#versioningtemplate |
Hmm. |
Ah, if we enable separateMinorPatch, |
Fixed. Do you have any opinion? |
Maybe we can use https://docs.renovatebot.com/modules/versioning/#go-modules-directive-versioning |
And golang-version datasource also seems to be useful. https://docs.renovatebot.com/modules/datasource/golang-version/ I'll try them. |
❌ Go Modules Directive Versioning doesn't support x.y.z. |
golang-version works well.
I'm not sure the difference between |
I see that it updated to 1.19.5 and not 1.20 , am I understanding these PR's wrong? |
would have expected a PR for 1.19.5 to 1.20 |
Oh, I see. github-tagsWithout separateMinorPatch
With separateMinorPatch
golang-version + separateMinorPatch❌ |
Sorry. I'm a bit confused. Renovate is difficult. 😅 |
|
I confirmed |
thanks for fixing up the PR, yeh, renovate is difficult 😅 This looks good 👍 |
I set I confirmed
So I'll remove |
This reverts commit 5781c63. aquaproj#360 (comment)
Before releasing the new version, let me publish the prerelease version and test in a few days. https://github.com/aquaproj/aqua-renovate-config/releases/tag/1.5.2-1 |
Golang major releases follow
major.minor
only and patch releases followmajor.minor.patch
format. This change allows renovate to update Golang major/patch release versions.This should also fix an old issue #189.
Signed-off-by: Noel Georgi [email protected]