Skip to content

Commit

Permalink
Update renovate Docker tag to v37.246.1 (#36395)
Browse files Browse the repository at this point in the history
* Update renovate Docker tag to v37.246.1
* Update config to read composer require.php where set
  That way it'll start updating mediawiki-codesniffer in our codesniffer
  package again.

---------

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Brad Jorsch <brad.jorsch@automattic.com>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 470225e commit 0f8ef61
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
35 changes: 34 additions & 1 deletion .github/renovate-config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const child_process = require( 'child_process' );
const fs = require( 'fs' );
const path = require( 'path' );

Expand Down Expand Up @@ -87,8 +88,40 @@ module.exports = {
matchDepTypes: [ 'require' ],
constraintsFiltering: 'strict',
constraints: {
php: `~${ versions.MIN_PHP_VERSION }.0`,
php: `>=${ versions.MIN_PHP_VERSION }`,
},
},
...( () => {
const ret = {};
const { stdout } = child_process.spawnSync(
'git',
[ '-c', 'core.quotepath=off', 'ls-files', '*/composer.json' ],
{
cwd: monorepoBase,
stdio: [ 'ignore', 'pipe', 'ignore' ],
encoding: 'utf-8',
}
);
for ( const filepath of stdout.split( /\n/ ) ) {
if ( filepath === '' ) {
continue;
}
const json = JSON.parse( fs.readFileSync( filepath, 'utf8' ) );
if ( json.require?.php && json.require.php !== `>=${ versions.MIN_PHP_VERSION }` ) {
if ( ! ret[ json.require.php ] ) {
ret[ json.require.php ] = {
matchFileNames: [],
matchDatasources: [ 'packagist' ],
matchDepTypes: [ 'require' ],
constraints: {
php: json.require.php,
},
};
}
ret[ json.require.php ].matchFileNames.push( filepath );
}
}
return Object.values( ret );
} )(),
],
};
2 changes: 1 addition & 1 deletion .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
configurationFile: /tmp/monorepo/.github/renovate-config.js
token: ${{ secrets.RENOVATE_TOKEN }}
mount-docker-socket: true
renovate-version: 37.146.0
renovate-version: 37.246.1
env:
LOG_LEVEL: ${{ github.event.inputs.logLevel || 'debug' }}
RENOVATE_DRY_RUN: ${{ github.event.inputs.dryRun == 'no' && 'null' || github.event.inputs.dryRun || 'null' }}
Expand Down

0 comments on commit 0f8ef61

Please sign in to comment.