getMajor(), $currentVer->getMinor(), $currentVer->getPatch() + 1 )); } $versionInfoPath = dirname(__DIR__) . '/src/pocketmine/VersionInfo.php'; $versionInfo = file_get_contents($versionInfoPath); file_put_contents($versionInfoPath, preg_replace( '/^const IS_DEVELOPMENT_BUILD = true;$/m', 'const IS_DEVELOPMENT_BUILD = false;', $versionInfo )); echo "please add appropriate notes to the changelog and press enter..."; fgets(STDIN); system('git add "' . dirname(__DIR__) . '/changelogs"'); system('git commit -m "Release ' . BASE_VERSION . '" --include "' . $versionInfoPath . '"'); system('git tag ' . BASE_VERSION); file_put_contents($versionInfoPath, $mod = preg_replace( $pattern = '/^const BASE_VERSION = "' . preg_quote(BASE_VERSION, '/') . '";$/m', 'const BASE_VERSION = "' . $nextVer->getBaseVersion() . '";', $versionInfo )); system('git add "' . $versionInfoPath . '"'); system('git commit -m "' . $nextVer->getBaseVersion() . ' is next" --include "' . $versionInfoPath . '"'); echo "pushing changes in 10 seconds\n"; sleep(10); system('git push origin HEAD ' . BASE_VERSION);