Skip to content
Snippets Groups Projects
Commit bc693f20 authored by Bastian Gutschke's avatar Bastian Gutschke Committed by Rhys Arkins
Browse files

fix(post-upgrade-tasks)!: enable dot option for file filters (#21282)

Set `{ dot: true }` for minimatch.

Closes #21276

BREAKING CHANGE: dot files will now be included by default for all minimatch results
parent 08bbf812
No related branches found
No related tags found
No related merge requests found
...@@ -2615,6 +2615,7 @@ You can use variable templating in your commands if [`allowPostUpgradeCommandTem ...@@ -2615,6 +2615,7 @@ You can use variable templating in your commands if [`allowPostUpgradeCommandTem
### fileFilters ### fileFilters
A list of glob-style matchers that determine which files will be included in the final commit made by Renovate. A list of glob-style matchers that determine which files will be included in the final commit made by Renovate.
Dotfiles are included.
### executionMode ### executionMode
......
...@@ -110,7 +110,7 @@ export async function postUpgradeCommandsExecutor( ...@@ -110,7 +110,7 @@ export async function postUpgradeCommandsExecutor(
for (const relativePath of status.modified.concat(status.not_added)) { for (const relativePath of status.modified.concat(status.not_added)) {
for (const pattern of fileFilters) { for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) { if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug( logger.debug(
{ file: relativePath, pattern }, { file: relativePath, pattern },
'Post-upgrade file saved' 'Post-upgrade file saved'
...@@ -138,7 +138,7 @@ export async function postUpgradeCommandsExecutor( ...@@ -138,7 +138,7 @@ export async function postUpgradeCommandsExecutor(
for (const relativePath of status.deleted || []) { for (const relativePath of status.deleted || []) {
for (const pattern of fileFilters) { for (const pattern of fileFilters) {
if (minimatch(relativePath, pattern)) { if (minimatch(relativePath, pattern, { dot: true })) {
logger.debug( logger.debug(
{ file: relativePath, pattern }, { file: relativePath, pattern },
'Post-upgrade file removed' 'Post-upgrade file removed'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment