Skip to content

Commit 5eb2689

Browse files
committed
update template
1 parent a249710 commit 5eb2689

File tree

3 files changed

+24
-37
lines changed

3 files changed

+24
-37
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.24.1",
67
"python": "=={{ default_py }}"
78
},
@@ -67,6 +68,21 @@
6768
"uses: pdm-project/setup-pdm[\\s\\S]+?\\sversion: (?<currentValue>.*)\n"
6869
]
6970
},
71+
{
72+
"customType": "regex",
73+
"datasourceTemplate": "pypi",
74+
"depNameTemplate": "copier",
75+
"description": "Match copier version specified in the renovate constraints",
76+
"fileMatch": [
77+
"^\\.renovaterc\\.json$"
78+
[%- if project_name == "Serious Scaffold Python" %],
79+
"^template/\\.renovaterc\\.json\\.jinja$"
80+
[% endif %]
81+
],
82+
"matchStrings": [
83+
"\"copier\": \"(?<currentValue>.*)\""
84+
]
85+
},
7086
{
7187
"customType": "regex",
7288
"datasourceTemplate": "pypi",
@@ -112,20 +128,6 @@
112128
"--package (?<depName>.+?)@(?<currentValue>.+?)\\s"
113129
],
114130
"versioningTemplate": "docker"
115-
},
116-
{
117-
"customType": "regex",
118-
"datasourceTemplate": "git-tags",
119-
"depNameTemplate": "https://github.com/serious-scaffold/ss-python.git",
120-
"depTypeTemplate": "copier-template",
121-
"description": "Match template version specified in .copier-answers.yml",
122-
"managerFilePatterns": [
123-
"/^\\.copier-answers\\.yml$/"
124-
],
125-
"matchStrings": [
126-
"_commit: (?<currentValue>.*?)\n"
127-
],
128-
"versioningTemplate": "semver"
129131
}
130132
],
131133
"extends": [
@@ -228,21 +230,6 @@
228230
]
229231
}
230232
},
231-
{
232-
"commitMessageTopic": "serious-scaffold-python",
233-
"description": "Update template with copier when a new version is released",
234-
"matchDepTypes": [
235-
"copier-template"
236-
],
237-
"postUpgradeTasks": {
238-
"commands": [
239-
"git stash",
240-
"pip install copier==9.6.0",
241-
"copier update --skip-answered --defaults --vcs-ref {{ '{{{newVersion}}}' }}"
242-
]
243-
},
244-
"semanticCommitScope": "copier-template"
245-
},
246233
{
247234
"description": "Group pdm Python package and version specified in setup-pdm GitHub Action",
248235
"groupName": "pdm",

template/{% if repo_platform == 'github' %}.github{% endif %}/workflows/renovate.yml.jinja

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ 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-
{% if project_name == "Serious Scaffold Python" %}
23-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "gitlabci", "regex", "pre-commit"]'
24-
{% else %}
25-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
26-
{% endif %}
22+
[% if project_name == "Serious Scaffold Python" %]
23+
RENOVATE_ENABLED_MANAGERS: '["copier", "github-actions", "gitlabci", "pep621", "pre-commit", "regex"]'
24+
[% else %]
25+
RENOVATE_ENABLED_MANAGERS: '["copier", "github-actions", "pep621", "pre-commit", "regex"]'
26+
[% endif %]
2727
RENOVATE_OPTIMIZE_FOR_DISABLED: "true"
2828
RENOVATE_PLATFORM: github
2929
RENOVATE_REPOSITORIES: '["{{ '${{ github.repository }}' }}"]'

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)