Skip to content

Commit fe3eb6b

Browse files
authored
perf: use copier manager (#31)
Signed-off-by: l.feng <[email protected]>
1 parent dcd7c37 commit fe3eb6b

File tree

4 files changed

+8
-80
lines changed

4 files changed

+8
-80
lines changed

.github/workflows/renovate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
container:
1212
env:
1313
LOG_LEVEL: debug
14-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find", "^apt"]'
14+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^find"]'
1515
RENOVATE_BRANCH_PREFIX: renovate-github/
1616
RENOVATE_ENABLED: ${{ vars.RENOVATE_ENABLED || true }}
17-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
17+
RENOVATE_ENABLED_MANAGERS: '["pep621", "copier", "github-actions", "regex", "pre-commit"]'
1818
RENOVATE_OPTIMIZE_FOR_DISABLED: 'true'
1919
RENOVATE_PLATFORM: github
2020
RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'

.renovaterc.json

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
],
88
"automergeType": "pr",
99
"automergeStrategy": "merge-commit",
10+
"ignoreScripts": false,
1011
"platformAutomerge": true,
1112
"packageRules": [
1213
{
@@ -97,29 +98,6 @@
9798
"renovate/renovate",
9899
"renovatebot/pre-commit-hooks"
99100
]
100-
},
101-
{
102-
"commitMessageTopic": "serious-scaffold",
103-
"matchDepTypes": [
104-
"ss-template"
105-
],
106-
"postUpgradeTasks": {
107-
"commands": [
108-
"git stash",
109-
"apt update",
110-
"apt install python3-pip -y",
111-
"pip install copier==9.4.1 --break-system-packages",
112-
"copier update --defaults --vcs-ref {{{newVersion}}}"
113-
]
114-
},
115-
"semanticCommitScope": "ss-template"
116-
},
117-
{
118-
"description": "Group apt packages to avoid failure when multiple packages are outdated.",
119-
"groupName": "apt packages",
120-
"matchDepTypes": [
121-
"apt"
122-
]
123101
}
124102
],
125103
"customManagers": [
@@ -140,7 +118,7 @@
140118
]
141119
},
142120
{
143-
"description": " Update vcpkg.json builtin-baseline with git hash",
121+
"description": "Update vcpkg.json builtin-baseline with git hash",
144122
"customType": "regex",
145123
"currentValueTemplate": "master",
146124
"datasourceTemplate": "git-refs",
@@ -165,20 +143,6 @@
165143
"matchStrings": [
166144
"\"baseline\": \"(?<currentDigest>.*?)\"[^}]+?\"repository\": \"(?<depName>.*?)\""
167145
]
168-
},
169-
{
170-
"description": "Update ss template from serious-scaffold",
171-
"customType": "regex",
172-
"datasourceTemplate": "git-tags",
173-
"depNameTemplate": "https://github.com/serious-scaffold/ss-pybind11.git",
174-
"depTypeTemplate": "ss-template",
175-
"fileMatch": [
176-
"^\\.copier-answers\\.yml$"
177-
],
178-
"matchStrings": [
179-
"_commit: (?<currentValue>.*?)\n"
180-
],
181-
"versioningTemplate": "semver"
182146
}
183147
]
184148
}

template/.renovaterc.json.jinja

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
],
1010
"automergeType": "pr",
1111
"automergeStrategy": "merge-commit",
12+
"ignoreScripts": false,
1213
"platformAutomerge": true,
1314
"packageRules": [
1415
{
@@ -109,29 +110,6 @@
109110
[%- endif %]
110111
"renovatebot/pre-commit-hooks"
111112
]
112-
},
113-
{
114-
"commitMessageTopic": "serious-scaffold",
115-
"matchDepTypes": [
116-
"ss-template"
117-
],
118-
"postUpgradeTasks": {
119-
"commands": [
120-
"git stash",
121-
"apt update",
122-
"apt install python3-pip -y",
123-
"pip install copier==9.4.1 --break-system-packages",
124-
"copier update --defaults --vcs-ref {{ '{{{newVersion}}}' }}"
125-
]
126-
},
127-
"semanticCommitScope": "ss-template"
128-
},
129-
{
130-
"description": "Group apt packages to avoid failure when multiple packages are outdated.",
131-
"groupName": "apt packages",
132-
"matchDepTypes": [
133-
"apt"
134-
]
135113
}
136114
],
137115
"customManagers": [
@@ -154,7 +132,7 @@
154132
]
155133
},
156134
{
157-
"description": " Update vcpkg.json builtin-baseline with git hash",
135+
"description": "Update vcpkg.json builtin-baseline with git hash",
158136
"customType": "regex",
159137
"currentValueTemplate": "master",
160138
"datasourceTemplate": "git-refs",
@@ -179,20 +157,6 @@
179157
"matchStrings": [
180158
"\"baseline\": \"(?<currentDigest>.*?)\"[^}]+?\"repository\": \"(?<depName>.*?)\""
181159
]
182-
},
183-
{
184-
"description": "Update ss template from serious-scaffold",
185-
"customType": "regex",
186-
"datasourceTemplate": "git-tags",
187-
"depNameTemplate": "https://github.com/serious-scaffold/ss-pybind11.git",
188-
"depTypeTemplate": "ss-template",
189-
"fileMatch": [
190-
"^\\.copier-answers\\.yml$"
191-
],
192-
"matchStrings": [
193-
"_commit: (?<currentValue>.*?)\n"
194-
],
195-
"versioningTemplate": "semver"
196160
}
197161
]
198162
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
container:
1212
env:
1313
LOG_LEVEL: debug
14-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^pip", "^copier", "^find", "^apt"]'
14+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^git", "^find"]'
1515
RENOVATE_BRANCH_PREFIX: renovate-github/
1616
RENOVATE_ENABLED: {{ '${{ vars.RENOVATE_ENABLED || true }}' }}
17-
RENOVATE_ENABLED_MANAGERS: '["pep621", "github-actions", "regex", "pre-commit"]'
17+
RENOVATE_ENABLED_MANAGERS: '["pep621", "copier", "github-actions", "regex", "pre-commit"]'
1818
RENOVATE_OPTIMIZE_FOR_DISABLED: 'true'
1919
RENOVATE_PLATFORM: github
2020
RENOVATE_REPOSITORIES: '["{{ '${{ github.repository }}' }}"]'

0 commit comments

Comments
 (0)