mirror of
https://github.com/danog/parser.git
synced 2024-11-30 04:29:13 +01:00
23 lines
591 B
PHP
Executable File
23 lines
591 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
$files = [
|
|
__DIR__ . '/../trunk_compiler/Cargo.toml',
|
|
__DIR__ . '/../trunk_parser/Cargo.toml',
|
|
__DIR__ . '/../trunk_lexer/Cargo.toml',
|
|
__DIR__ . '/../trunk_bytecode/Cargo.toml',
|
|
__DIR__ . '/../phpast/Cargo.toml',
|
|
];
|
|
|
|
$version = readline('What would you like the new version to be? ');
|
|
|
|
foreach ($files as $file) {
|
|
echo "Updating {$file}.\n";
|
|
|
|
file_put_contents(
|
|
$file,
|
|
preg_replace('/version = "(.*)"/', 'version = "' . $version . '"', file_get_contents($file))
|
|
);
|
|
}
|
|
|
|
echo "Version updated to {$version}.\n"; |