Skip to content

Commit a249710

Browse files
committed
feat(no-release): use copier manager in Renovate
1 parent c63a552 commit a249710

File tree

3 files changed

+18
-33
lines changed

3 files changed

+18
-33
lines changed

.github/workflows/renovate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
container:
1717
env:
1818
LOG_LEVEL: debug
19-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pdm", "^pip", "^copier", "^find"]'
19+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^find", "^pdm"]'
2020
RENOVATE_BRANCH_PREFIX: renovate-github/
2121
RENOVATE_ENABLED: ${{ vars.RENOVATE_ENABLED || true }}
22-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "gitlabci", "regex", "pre-commit"]'
22+
RENOVATE_ENABLED_MANAGERS: '["copier", "github-actions", "gitlabci", "pep621", "pre-commit", "regex"]'
2323
RENOVATE_OPTIMIZE_FOR_DISABLED: "true"
2424
RENOVATE_PLATFORM: github
2525
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'

.gitlab/workflows/renovate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ renovate:
1111
variables:
1212
GIT_STRATEGY: none
1313
LOG_LEVEL: debug
14-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pdm", "^pip", "^copier", "^find"]'
14+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^find", "^pdm"]'
1515
RENOVATE_BASE_DIR: $CI_PROJECT_DIR/renovate
1616
RENOVATE_BRANCH_PREFIX: renovate-gitlab/
17-
RENOVATE_ENABLED_MANAGERS: '["pep621", "gitlabci", "regex", "pre-commit"]'
17+
RENOVATE_ENABLED_MANAGERS: '["copier", "gitlabci", "pep621", "pre-commit", "regex"]'
1818
RENOVATE_ENDPOINT: $CI_API_V4_URL
1919
RENOVATE_OPTIMIZE_FOR_DISABLED: "true"
2020
RENOVATE_PLATFORM: gitlab

.renovaterc.json

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"constraints": {
4+
"copier": "9.4.1",
45
"pdm": "2.24.1",
56
"python": "==3.12"
67
},
@@ -60,6 +61,19 @@
6061
"uses: pdm-project/setup-pdm[\\s\\S]+?\\sversion: (?<currentValue>.*)\n"
6162
]
6263
},
64+
{
65+
"customType": "regex",
66+
"datasourceTemplate": "pypi",
67+
"depNameTemplate": "copier",
68+
"description": "Match copier version specified in the renovate constraints",
69+
"fileMatch": [
70+
"^\\.renovaterc\\.json$",
71+
"^template/\\.renovaterc\\.json\\.jinja$"
72+
],
73+
"matchStrings": [
74+
"\"copier\": \"(?<currentValue>.*)\""
75+
]
76+
},
6377
{
6478
"customType": "regex",
6579
"datasourceTemplate": "pypi",
@@ -101,20 +115,6 @@
101115
"--package (?<depName>.+?)@(?<currentValue>.+?)\\s"
102116
],
103117
"versioningTemplate": "docker"
104-
},
105-
{
106-
"customType": "regex",
107-
"datasourceTemplate": "git-tags",
108-
"depNameTemplate": "https://github.com/serious-scaffold/ss-python.git",
109-
"depTypeTemplate": "copier-template",
110-
"description": "Match template version specified in .copier-answers.yml",
111-
"managerFilePatterns": [
112-
"/^\\.copier-answers\\.yml$/"
113-
],
114-
"matchStrings": [
115-
"_commit: (?<currentValue>.*?)\n"
116-
],
117-
"versioningTemplate": "semver"
118118
}
119119
],
120120
"extends": [
@@ -213,21 +213,6 @@
213213
]
214214
}
215215
},
216-
{
217-
"commitMessageTopic": "serious-scaffold-python",
218-
"description": "Update template with copier when a new version is released",
219-
"matchDepTypes": [
220-
"copier-template"
221-
],
222-
"postUpgradeTasks": {
223-
"commands": [
224-
"git stash",
225-
"pip install copier==9.6.0",
226-
"copier update --skip-answered --defaults --vcs-ref {{{newVersion}}}"
227-
]
228-
},
229-
"semanticCommitScope": "copier-template"
230-
},
231216
{
232217
"description": "Group pdm Python package and version specified in setup-pdm GitHub Action",
233218
"groupName": "pdm",

0 commit comments

Comments
 (0)