1
Fork 0

Fix commit-based pip packages

It seems that Renovate assumes Git tags for these kind of definitions,
and therefore cannot handle commit refs.
So a custom regex manager is needed, with a way to manually specify the
branch to use, thanks to the `master` vs `main` split.
This commit is contained in:
Lucas Schwiderski 2024-08-26 10:56:34 +02:00
parent 9bce4a9834
commit ea4acbb4b9
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8
3 changed files with 34 additions and 1 deletions

View file

@ -19,6 +19,19 @@
"matchStrings": [ "matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s" "# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
] ]
},
{
"customType": "regex",
"description": "Update git-ref pip packages",
"fileMatch": [
"(^|/)requirements.txt$"
],
"matchStrings": [
"(# renovate:( branch=(?<currentValue>\\S+))?\\n)?git\\+(?<packageName>https://.*?)(\\.git)?@(?<currentDigest>.*?)\\n"
],
"currentValueTemplate": "{{#if currentValue}}{{{currentValue}}}{{else}}master{{/if}}",
"datasourceTemplate": "git-refs",
"versioningTemplate": "none"
} }
], ],
"packageRules": [ "packageRules": [
@ -33,7 +46,8 @@
}, },
{ {
"matchPackageNames": [ "matchPackageNames": [
"nodejs/node", "nodejs" "nodejs/node",
"nodejs"
], ],
"matchDatasources": [ "matchDatasources": [
"docker" "docker"

View file

@ -31,3 +31,17 @@ set-pipeline: (make-pipeline pipeline_file)
--config "{{pipeline_file}}" \ --config "{{pipeline_file}}" \
-v registry_url={{registry_url}} \ -v registry_url={{registry_url}} \
-v repo_url={{repo_url}} -v repo_url={{repo_url}}
validate:
docker run --rm -v ./:/usr/src/app renovate/renovate renovate-config-validator --strict
renovate *args='':
docker run --rm -t \
-v ./:/usr/src/app \
-e LOG_FORMAT=pretty \
-e LOG_LEVEL=debug \
renovate/renovate \
--platform=local \
--github-token-warn=false \
{{args}} \
|& bat

View file

@ -1,9 +1,14 @@
# Ensure a compatible version of Beancount, including personal tooling
beancount<3.0.0
beancount-reds-plugins==0.3.0 beancount-reds-plugins==0.3.0
beanprice==1.2.1 beanprice==1.2.1
fava_envelope==0.5.9 fava_envelope==0.5.9
fava-investor==0.7.0 fava-investor==0.7.0
# renovate: branch=main
git+https://github.com/andreasgerstmayr/fava-dashboards.git@df40f4e2ccc6b4ec479e5146d8e62c327e44e6f9 git+https://github.com/andreasgerstmayr/fava-dashboards.git@df40f4e2ccc6b4ec479e5146d8e62c327e44e6f9
git+https://github.com/beancount/beangrow.git@7dd642b10a66c10ec807d9eb50fd58dc26635ba2 git+https://github.com/beancount/beangrow.git@7dd642b10a66c10ec807d9eb50fd58dc26635ba2
# renovate: branch=main
git+https://github.com/daniel-wells/beancount_checkclosed.git@5abc380703105c12b518144f83a5c4fe25cc8f39 git+https://github.com/daniel-wells/beancount_checkclosed.git@5abc380703105c12b518144f83a5c4fe25cc8f39
# renovate: branch=main
git+https://github.com/PhracturedBlue/fava-portfolio-summary.git@fb31e371c9808a8a99ea02a60e3712271925d379 git+https://github.com/PhracturedBlue/fava-portfolio-summary.git@fb31e371c9808a8a99ea02a60e3712271925d379
git+https://github.com/scauligi/refried.git@b1b2a1fe1efd321142163ecc1796a38b71bb48b0 git+https://github.com/scauligi/refried.git@b1b2a1fe1efd321142163ecc1796a38b71bb48b0