mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Update _release.php
This commit is contained in:
parent
90076497f3
commit
affb488587
1 changed files with 7 additions and 0 deletions
|
@ -57,15 +57,22 @@ if (empty($date)) {
|
||||||
out("- Using date: $date", 'info');
|
out("- Using date: $date", 'info');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read config file content
|
||||||
$content = file_get_contents($configFile);
|
$content = file_get_contents($configFile);
|
||||||
|
|
||||||
|
// Update version
|
||||||
$content = preg_replace(
|
$content = preg_replace(
|
||||||
"/\\\$bb_cfg\['tp_version'\]\s*=\s*'[^']*';/",
|
"/\\\$bb_cfg\['tp_version'\]\s*=\s*'[^']*';/",
|
||||||
"\$bb_cfg['tp_version'] = '$version';",
|
"\$bb_cfg['tp_version'] = '$version';",
|
||||||
$content
|
$content
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Update release date
|
||||||
$content = preg_replace(
|
$content = preg_replace(
|
||||||
"/\\\$bb_cfg\['tp_release_date'\]\s*=\s*'[^']*';/",
|
"/\\\$bb_cfg\['tp_release_date'\]\s*=\s*'[^']*';/",
|
||||||
"\$bb_cfg['tp_release_date'] = '$date';",
|
"\$bb_cfg['tp_release_date'] = '$date';",
|
||||||
$content
|
$content
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Save updated config
|
||||||
file_put_contents($configFile, $content);
|
file_put_contents($configFile, $content);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue