Skip to content

Commit

Permalink
feat: support Gitea (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Feb 2, 2024
1 parent 116218d commit 7353a34
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,20 @@
" +(?:name|'name'|\"name\") *: +\"(?<depName>gitlab\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)\""
]
},
{
"datasourceTemplate": "gitea-releases",
"fileMatch": [
"\\.?aqua\\.ya?ml"
],
"matchStrings": [
" +(?:version|'version'|\"version\") *: +(?<currentValue>[^'\" \\n]+) +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:version|'version'|\"version\") *: +'(?<currentValue>[^'\" \\n]+)' +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:version|'version'|\"version\") *: +\"(?<currentValue>[^'\" \\n]+)\" +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:name|'name'|\"name\") *: +(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)",
" +(?:name|'name'|\"name\") *: +'(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)'",
" +(?:name|'name'|\"name\") *: +\"(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)\""
]
},
{
"customType": "regex",
"datasourceTemplate": "github-releases",
Expand Down
14 changes: 14 additions & 0 deletions file.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@
" +(?:name|'name'|\"name\") *: +\"(?<depName>gitlab\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)\""
]
},
{
"datasourceTemplate": "gitea-releases",
"fileMatch": [
"{{arg0}}"
],
"matchStrings": [
" +(?:version|'version'|\"version\") *: +(?<currentValue>[^'\" \\n]+) +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:version|'version'|\"version\") *: +'(?<currentValue>[^'\" \\n]+)' +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:version|'version'|\"version\") *: +\"(?<currentValue>[^'\" \\n]+)\" +# renovate: depName=(?<depName>gitea\\.com/(?<packageName>[^\\n]+))",
" +(?:name|'name'|\"name\") *: +(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)",
" +(?:name|'name'|\"name\") *: +'(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)'",
" +(?:name|'name'|\"name\") *: +\"(?<depName>gitea\\.com/(?<packageName>[^\\n]+))@(?<currentValue>[^'\" \\n]+)\""
]
},
{
"customType": "regex",
"datasourceTemplate": "github-releases",
Expand Down
15 changes: 15 additions & 0 deletions jsonnet/utils.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
goModuleDepName: '(?<depName>golang\\.org/[^\\n]+)',
crateDepName: '(?<depName>crates\\.io/(?<packageName>[^\\n]+))',
gitlabDepName: '(?<depName>gitlab\\.com/(?<packageName>[^\\n]+))',
giteaDepName: '(?<depName>gitea\\.com/(?<packageName>[^\\n]+))',

registryRegexManager: {
customType: "regex",
Expand Down Expand Up @@ -123,6 +124,19 @@
],
datasourceTemplate: 'gitlab-releases',
},
giteaPkg: {
fileMatch: $.aquaYAMLFileMatch,
matchStrings: [
' +%s *: +%s +# renovate: depName=%s' % [$.wrapQuote('version'), $.currentValue, $.giteaDepName],
" +%s *: +'%s' +# renovate: depName=%s" % [$.wrapQuote('version'), $.currentValue, $.giteaDepName],
' +%s *: +"%s" +# renovate: depName=%s' % [$.wrapQuote('version'), $.currentValue, $.giteaDepName],

' +%s *: +%s@%s' % [$.wrapQuote('name'), $.giteaDepName, $.currentValue],
" +%s *: +'%s@%s'" % [$.wrapQuote('name'), $.giteaDepName, $.currentValue],
' +%s *: +"%s@%s"' % [$.wrapQuote('name'), $.giteaDepName, $.currentValue],
],
datasourceTemplate: 'gitea-releases',
},
kubectlConvert: {
datasourceTemplate: 'github-releases',
depNameTemplate: 'kubernetes/kubectl-convert',
Expand Down Expand Up @@ -171,6 +185,7 @@
$.goPkg,
$.cratePkg,
$.gitlabPkg,
$.giteaPkg,
$.prefixRegexManager('oven-sh/bun', 'bun-'),
$.golangGo,
$.gopls,
Expand Down

0 comments on commit 7353a34

Please sign in to comment.