mirror of
https://github.com/siderolabs/kres.git
synced 2026-02-05 09:45:35 +01:00
feat: migrate renovate config
Use new `managerFilePatterns`. Also update deps. Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
4
.github/renovate.json
vendored
4
.github/renovate.json
vendored
@@ -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=(?<datasource>.*?)(?:\\s+extractVersion=(?<extractVersion>.+?))?(?:\\s+versioning=(?<versioning>.+?))?\\s+depName=(?<depName>.+?)?\\s.*Version\\s+=\\s+\\\"(?<currentValue>.+?)\\\""
|
||||
|
||||
@@ -70,7 +70,7 @@ kind: common.Renovate
|
||||
spec:
|
||||
customManagers:
|
||||
- customType: regex
|
||||
fileMatch:
|
||||
managerFilePatterns:
|
||||
- internal/config/constants.go
|
||||
matchStrings:
|
||||
- '\/\/\s+renovate: datasource=(?<datasource>.*?)(?:\s+extractVersion=(?<extractVersion>.+?))?(?:\s+versioning=(?<versioning>.+?))?\s+depName=(?<depName>.+?)?\s.*Version\s+=\s+\"(?<currentValue>.+?)\"'
|
||||
|
||||
@@ -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 .
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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:(?<currentValue>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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user