mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
make-release: allow specifying the nextVer as well as currentVer
This commit is contained in:
parent
e1b7bf31bb
commit
92f3a7d206
@ -66,7 +66,7 @@ function replaceVersion(string $versionInfoPath, string $newVersion, bool $isDev
|
|||||||
*/
|
*/
|
||||||
function main(array $argv) : void{
|
function main(array $argv) : void{
|
||||||
if(count($argv) < 2){
|
if(count($argv) < 2){
|
||||||
fwrite(STDERR, "Arguments: <channel> [release version]\n");
|
fwrite(STDERR, "Arguments: <channel> [release version] [next version]\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if(isset($argv[2])){
|
if(isset($argv[2])){
|
||||||
@ -74,12 +74,16 @@ function main(array $argv) : void{
|
|||||||
}else{
|
}else{
|
||||||
$currentVer = VersionInfo::VERSION();
|
$currentVer = VersionInfo::VERSION();
|
||||||
}
|
}
|
||||||
|
if(isset($argv[3])){
|
||||||
|
$nextVer = new VersionString($argv[3]);
|
||||||
|
}else{
|
||||||
$nextVer = new VersionString(sprintf(
|
$nextVer = new VersionString(sprintf(
|
||||||
"%u.%u.%u",
|
"%u.%u.%u",
|
||||||
$currentVer->getMajor(),
|
$currentVer->getMajor(),
|
||||||
$currentVer->getMinor(),
|
$currentVer->getMinor(),
|
||||||
$currentVer->getPatch() + 1
|
$currentVer->getPatch() + 1
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
echo "please add appropriate notes to the changelog and press enter...";
|
echo "please add appropriate notes to the changelog and press enter...";
|
||||||
fgets(STDIN);
|
fgets(STDIN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user