|
@@ 251-254 (lines=4) @@
|
| 248 |
|
{ |
| 249 |
|
throw new Exception("checkout directory '{$config['checkoutdir']} does NOT exists or is NO directory!"); |
| 250 |
|
} |
| 251 |
|
if (!($mrconfig = file_get_contents($path=$config['checkoutdir'].'/.mrconfig'))) |
| 252 |
|
{ |
| 253 |
|
throw new Exception("$path not found!"); |
| 254 |
|
} |
| 255 |
|
$module = $baseurl = null; |
| 256 |
|
$modules = array(); |
| 257 |
|
foreach(explode("\n", $mrconfig) as $line) |
|
@@ 382-385 (lines=4) @@
|
| 379 |
|
{ |
| 380 |
|
global $config; |
| 381 |
|
|
| 382 |
|
if (!($json = file_get_contents($path=$config['checkoutdir'].'/composer.json'))) |
| 383 |
|
{ |
| 384 |
|
throw new Exception("Can NOT read $path to update with new version!"); |
| 385 |
|
} |
| 386 |
|
if (preg_match('/"version":\s*"[^"]+"/', $json)) |
| 387 |
|
{ |
| 388 |
|
$json = preg_replace('/"version":\s*"[^"]+"/', '"version": "'.$version.'"', $json); |