Skip to content
Snippets Groups Projects
Commit a9b847ea authored by totten's avatar totten
Browse files

set-version.php - Fix autocommit for 'info.xml'

The 'set-version.php' script has an option `--commit` which should commit any updated files.

Before: Fails to commit changes to `ext/*/info.xml`

After: Does ocmmit changes to `ext/*/info.xml`
parent efddb753
Branches
Tags
No related merge requests found
......@@ -74,7 +74,8 @@ updateFile("sql/test_data_second_domain.mysql", function ($content) use ($newVer
return str_replace($oldVersion, $newVersion, $content);
});
foreach (findCoreInfoXml() as $infoXml) {
$infoXmls = findCoreInfoXml();
foreach ($infoXmls as $infoXml) {
updateXmlFile($infoXml, function (DOMDocument $dom) use ($newVersion) {
foreach ($dom->getElementsByTagName('version') as $tag) {
/** @var \DOMNode $tag */
......@@ -85,7 +86,7 @@ foreach (findCoreInfoXml() as $infoXml) {
if ($doCommit) {
$files = array_filter(
['xml/version.xml', 'sql/civicrm_generated.mysql', 'sql/test_data_second_domain.mysql', $phpFile, @$sqlFile],
array_merge(['xml/version.xml', 'sql/civicrm_generated.mysql', 'sql/test_data_second_domain.mysql', $phpFile, @$sqlFile], $infoXmls),
'file_exists'
);
$filesEsc = implode(' ', array_map('escapeshellarg', $files));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment