Skip to content

Commit d1b0fc3

Browse files
committed
update template
1 parent b082cfc commit d1b0fc3

File tree

3 files changed

+21
-34
lines changed

3 files changed

+21
-34
lines changed

template/.renovaterc.json.jinja

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
44
"constraints": {
5+
"copier": "9.4.1",
56
"pdm": "2.22.3",
67
"python": "=={{ default_py }}"
78
},
@@ -66,6 +67,21 @@
6667
"uses: pdm-project/setup-pdm[\\s\\S]+?\\sversion: (?<currentValue>.*)\n"
6768
]
6869
},
70+
{
71+
"customType": "regex",
72+
"datasourceTemplate": "pypi",
73+
"depNameTemplate": "copier",
74+
"description": "Match copier version specified in the renovate constraints",
75+
"fileMatch": [
76+
"^\\.renovaterc\\.json$"
77+
[%- if project_name == "Serious Scaffold Python" %],
78+
"^template/\\.renovaterc\\.json\\.jinja$"
79+
[% endif %]
80+
],
81+
"matchStrings": [
82+
"\"copier\": \"(?<currentValue>.*)\""
83+
]
84+
},
6985
{
7086
"customType": "regex",
7187
"datasourceTemplate": "pypi",
@@ -111,20 +127,6 @@
111127
"--package (?<depName>.+?)@(?<currentValue>.+?)\\s"
112128
],
113129
"versioningTemplate": "docker"
114-
},
115-
{
116-
"customType": "regex",
117-
"datasourceTemplate": "git-tags",
118-
"depNameTemplate": "https://github.com/serious-scaffold/ss-python.git",
119-
"depTypeTemplate": "copier-template",
120-
"description": "Match template version specified in .copier-answers.yml",
121-
"fileMatch": [
122-
"^\\.copier-answers\\.yml$"
123-
],
124-
"matchStrings": [
125-
"_commit: (?<currentValue>.*?)\n"
126-
],
127-
"versioningTemplate": "semver"
128130
}
129131
],
130132
"extends": [
@@ -215,21 +217,6 @@
215217
]
216218
}
217219
},
218-
{
219-
"commitMessageTopic": "serious-scaffold-python",
220-
"description": "Update template with copier when a new version is released",
221-
"matchDepTypes": [
222-
"copier-template"
223-
],
224-
"postUpgradeTasks": {
225-
"commands": [
226-
"git stash",
227-
"pip install copier==9.4.1",
228-
"copier update --defaults --vcs-ref {{ '{{{newVersion}}}' }}"
229-
]
230-
},
231-
"semanticCommitScope": "copier-template"
232-
},
233220
{
234221
"description": "Group pdm Python package and version specified in setup-pdm GitHub Action",
235222
"groupName": "pdm",

template/[% if repo_platform == 'github' %].github[% endif %]/workflows/renovate.yml.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ jobs:
44
container:
55
env:
66
LOG_LEVEL: debug
7-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pdm", "^pip", "^copier", "^find"]'
7+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^find", "^pdm"]'
88
RENOVATE_BRANCH_PREFIX: renovate-github/
99
RENOVATE_ENABLED: {{ '${{ vars.RENOVATE_ENABLED || true }}' }}
1010
[% if project_name == "Serious Scaffold Python" %]
11-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "gitlabci", "regex", "pre-commit"]'
11+
RENOVATE_ENABLED_MANAGERS: '["copier", "github-actions", "gitlabci", "pep621", "pre-commit", "regex"]'
1212
[% else %]
13-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
13+
RENOVATE_ENABLED_MANAGERS: '["copier", "github-actions", "pep621", "pre-commit", "regex"]'
1414
[% endif %]
1515
RENOVATE_OPTIMIZE_FOR_DISABLED: "true"
1616
RENOVATE_PLATFORM: github

template/[% if repo_platform == 'gitlab' or repo_platform == 'gitlab-self-managed' %].gitlab[% endif %]/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

0 commit comments

Comments
 (0)