Commit 653b713e authored by gitsync's avatar gitsync

set-version.php - Fix for running on uninitialized codebase

The script assumes that `civicrm-version.php` is around. It will eventually be
committed, and it's available if you ran GenCode, but it's not *necessarily*
around yet.
parent 7e5f11ec
......@@ -61,9 +61,11 @@ updateFile("xml/version.xml", function ($content) use ($newVersion, $oldVersion)
return str_replace($oldVersion, $newVersion, $content);
});
updateFile("civicrm-version.php", function ($content) use ($newVersion, $oldVersion) {
return str_replace($oldVersion, $newVersion, $content);
});
if (file_exists("civicrm-version.php")) {
updateFile("civicrm-version.php", function ($content) use ($newVersion, $oldVersion) {
return str_replace($oldVersion, $newVersion, $content);
});
}
updateFile("sql/civicrm_generated.mysql", function ($content) use ($newVersion, $oldVersion) {
return str_replace($oldVersion, $newVersion, $content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment