我正在尝试通过renovate在我的git repository中监控一个Dockerfile,它将postfixadmin/postfixadmin的git标签版本作为参数。此版本应由regexManager监控。作为数据源,我使用github-tag。下面是我的配置:
{
"regexManagers": [
{
"description": "Update postfixadmin git tag",
"fileMatch": [
"^Dockerfile$"
],
"matchStrings": [
"ARG POSTFIXADMIN_VERSION=(?<currentValue>.*?)"
],
"depNameTemplate": "postfixadmin/postfixadmin",
"versioningTemplate": "regex:^(?<prefix>postfixadmin-)?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
"datasourceTemplate": "github-tags"
}
]
}我通过regex101.com验证了我的versioningTemplate正则表达式,但是我没有收到任何使用新版本的postfixadmin的拉取请求。
有谁知道这里是什么吗,小姐?
发布于 2021-10-30 20:23:20
这里的底层regex引擎是PHP PCRE,您需要在这里使用一种编写regexp的特定形式,即regex文字表示法。
这个错误应该用
"versioningTemplate": "regex:/^(?<prefix>postfixadmin-)?(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)$/",其中/字符用作正则表达式分隔符。
由于正则表达式是在一个单独的文件中编写的,而不是在代码文件中,因此您不需要双反斜杠,除非软件以特定的方式解析它们。
https://stackoverflow.com/questions/69780213
复制相似问题