diff --git a/tests/makephar.sh b/tests/makephar.sh index 8e22000bd..774fbbbf5 100755 --- a/tests/makephar.sh +++ b/tests/makephar.sh @@ -112,16 +112,16 @@ rm -f madeline.phar testing.madeline* echo "Testing with previous version..." export ACTIONS_FORCE_PREVIOUS=1 -#runTest -#k +runTest +k echo "Testing with new version (upgrade)..." php tools/makephar.php $madelinePath/../phar "madeline$php$branch.phar" "$COMMIT-$php" cp "madeline$php$branch.phar" "madeline-$php.phar" export ACTIONS_PHAR=1 -#reset -#runTestSimple -#k +reset +runTestSimple +k echo "Testing with new version (restart)" reset diff --git a/tools/phar.php b/tools/phar.php index 009abbd43..800028235 100644 --- a/tools/phar.php +++ b/tools/phar.php @@ -73,7 +73,11 @@ function ___install_madeline() if (\strpos($name, 'phabel/transpiler') === 0) { $name = \explode('/', $name, 3)[2]; } - $packages[$name] = $dep['version_normalized']; + $version = $dep['version_normalized']; + if ($name === 'danog/madelineproto' && \substr($version, 0, 2) === '90') { + $version = \substr($version, 2); + } + $packages[$name] = $version; } return $packages; }; @@ -113,7 +117,7 @@ function ___install_madeline() 'Content-Type: application/json', \sprintf( 'User-Agent: Composer/%s (%s; %s; %s; %s%s)', - 'Madeline v7', + 'MProto v7', \function_exists('php_uname') ? @\php_uname('s') : 'Unknown', \function_exists('php_uname') ? @\php_uname('r') : 'Unknown', $phpVersion,