diff --git a/.github/renovate.json b/.github/renovate.json index 08deb13..0cd07ed 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -12,8 +12,8 @@ { "customType": "regex", "versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}", - "fileMatch": [ - "internal/config/constants.go" + "managerFilePatterns": [ + "/internal/config/constants.go/" ], "matchStrings": [ "\\/\\/\\s+renovate: datasource=(?.*?)(?:\\s+extractVersion=(?.+?))?(?:\\s+versioning=(?.+?))?\\s+depName=(?.+?)?\\s.*Version\\s+=\\s+\\\"(?.+?)\\\"" diff --git a/.kres.yaml b/.kres.yaml index 21d1446..0870a49 100644 --- a/.kres.yaml +++ b/.kres.yaml @@ -70,7 +70,7 @@ kind: common.Renovate spec: customManagers: - customType: regex - fileMatch: + managerFilePatterns: - internal/config/constants.go matchStrings: - '\/\/\s+renovate: datasource=(?.*?)(?:\s+extractVersion=(?.+?))?(?:\s+versioning=(?.+?))?\s+depName=(?.+?)?\s.*Version\s+=\s+\"(?.+?)\"' diff --git a/Dockerfile b/Dockerfile index caf5e7d..5f2fa53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. # -# Generated on 2025-05-07T07:41:07Z by kres 1a0156b-dirty. +# Generated on 2025-05-20T12:20:25Z by kres 5ad3e5f-dirty. ARG TOOLCHAIN @@ -11,9 +11,9 @@ FROM ghcr.io/siderolabs/ca-certificates:v1.10.0 AS image-ca-certificates FROM ghcr.io/siderolabs/fhs:v1.10.0 AS image-fhs # runs markdownlint -FROM docker.io/oven/bun:1.2.12-alpine AS lint-markdown +FROM docker.io/oven/bun:1.2.13-alpine AS lint-markdown WORKDIR /src -RUN bun i markdownlint-cli@0.44.0 sentences-per-line@0.3.0 +RUN bun i markdownlint-cli@0.45.0 sentences-per-line@0.3.0 COPY .markdownlint.json . COPY ./README.md ./README.md RUN bunx markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules sentences-per-line . diff --git a/internal/config/constants.go b/internal/config/constants.go index ec50a4e..418ccd0 100644 --- a/internal/config/constants.go +++ b/internal/config/constants.go @@ -75,10 +75,10 @@ const ( LoginActionVersion = "v3" // MarkdownLintCLIVersion is the version of markdownlint. // renovate: datasource=npm depName=markdownlint-cli - MarkdownLintCLIVersion = "0.44.0" + MarkdownLintCLIVersion = "0.45.0" // BunContainerImageVersion is the default bun container image. // renovate: datasource=docker versioning=docker depName=oven/bun - BunContainerImageVersion = "1.2.12-alpine" + BunContainerImageVersion = "1.2.13-alpine" // PkgsVersion is the version of pkgs. // renovate: datasource=github-tags depName=siderolabs/pkgs PkgsVersion = "v1.10.0" diff --git a/internal/output/renovate/types.go b/internal/output/renovate/types.go index 7774b8e..6bc448e 100644 --- a/internal/output/renovate/types.go +++ b/internal/output/renovate/types.go @@ -17,12 +17,12 @@ type Renovate struct { // CustomManager represents a custom manager. type CustomManager struct { - CustomType string `json:"customType"` - DataSourceTemplate string `json:"datasourceTemplate,omitempty"` - DepNameTemplate string `json:"depNameTemplate,omitempty"` - VersioningTemplate string `json:"versioningTemplate"` - FileMatch []string `json:"fileMatch"` - MatchStrings []string `json:"matchStrings"` + CustomType string `json:"customType"` + DataSourceTemplate string `json:"datasourceTemplate,omitempty"` + DepNameTemplate string `json:"depNameTemplate,omitempty"` + VersioningTemplate string `json:"versioningTemplate"` + ManagerFilePatterns []string `json:"managerFilePatterns"` + MatchStrings []string `json:"matchStrings"` } // PackageRule represents a package rule. diff --git a/internal/project/common/renovate.go b/internal/project/common/renovate.go index 10b538c..dd8b1b0 100644 --- a/internal/project/common/renovate.go +++ b/internal/project/common/renovate.go @@ -25,12 +25,12 @@ type Renovate struct { // CustomManager represents a custom manager. type CustomManager struct { - CustomType string `yaml:"customType"` - DataSourceTemplate string `yaml:"datasourceTemplate,omitempty"` - DepNameTemplate string `yaml:"depNameTemplate,omitempty"` - VersioningTemplate string `yaml:"versioningTemplate"` - FileMatch []string `yaml:"fileMatch"` - MatchStrings []string `yaml:"matchStrings"` + CustomType string `yaml:"customType"` + DataSourceTemplate string `yaml:"datasourceTemplate,omitempty"` + DepNameTemplate string `yaml:"depNameTemplate,omitempty"` + VersioningTemplate string `yaml:"versioningTemplate"` + ManagerFilePatterns []string `yaml:"managerFilePatterns"` + MatchStrings []string `yaml:"matchStrings"` } // PackageRule represents a package rule. @@ -62,16 +62,18 @@ func (r *Renovate) CompileRenovate(o *renovate.Output) error { } o.Enable() + o.CustomManagers(xslices.Map(r.CustomManagers, func(cm CustomManager) renovate.CustomManager { return renovate.CustomManager{ - CustomType: cm.CustomType, - DataSourceTemplate: cm.DataSourceTemplate, - DepNameTemplate: cm.DepNameTemplate, - FileMatch: cm.FileMatch, - MatchStrings: cm.MatchStrings, - VersioningTemplate: cm.VersioningTemplate, + CustomType: cm.CustomType, + DataSourceTemplate: cm.DataSourceTemplate, + DepNameTemplate: cm.DepNameTemplate, + ManagerFilePatterns: xslices.Map(cm.ManagerFilePatterns, func(s string) string { return "/" + s + "/" }), + MatchStrings: cm.MatchStrings, + VersioningTemplate: cm.VersioningTemplate, } })) + o.PackageRules(xslices.Map(r.PackageRules, func(pr PackageRule) renovate.PackageRule { return renovate.PackageRule{ Enabled: pr.Enabled, diff --git a/internal/project/pkgfile/build.go b/internal/project/pkgfile/build.go index b9d5c2d..49922cd 100644 --- a/internal/project/pkgfile/build.go +++ b/internal/project/pkgfile/build.go @@ -307,16 +307,16 @@ func (pkgfile *Build) CompileGitHubWorkflow(output *ghworkflow.Output) error { func (pkgfile *Build) CompileRenovate(output *renovate.Output) error { customManagers := []renovate.CustomManager{ { - CustomType: "regex", - FileMatch: []string{"Pkgfile"}, + CustomType: "regex", + ManagerFilePatterns: []string{"Pkgfile"}, MatchStrings: []string{ renovateMatchStringPkgfile, }, VersioningTemplate: "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}", }, { - CustomType: "regex", - FileMatch: []string{"Pkgfile"}, + CustomType: "regex", + ManagerFilePatterns: []string{"Pkgfile"}, MatchStrings: []string{ "ghcr.io\\/siderolabs\\/bldr:(?v.*)", }, @@ -329,8 +329,8 @@ func (pkgfile *Build) CompileRenovate(output *renovate.Output) error { if pkgfile.UseBldrPkgTagResolver { customManagers = slices.Concat(customManagers, []renovate.CustomManager{ { - CustomType: "regex", - FileMatch: []string{"vars.yaml"}, + CustomType: "regex", + ManagerFilePatterns: []string{"vars.yaml"}, MatchStrings: []string{ renovateMatchStringPkgfile, },