Release master - Improve composer reporter

This commit is contained in:
Travis CI User 2020-02-05 22:18:29 +00:00
parent 69e5d0e258
commit f21b6cd89c
3 changed files with 10 additions and 5 deletions

Binary file not shown.

View File

@ -82,18 +82,23 @@ function ___install_madeline()
$phar = \file_get_contents(\sprintf($phar_template, $release_branch));
if ($phar) {
$extractVersions = static function () {
if (!\file_exists('phar://madeline.phar/vendor/composer/installed.json')) {
$extractVersions = static function ($ext = '') {
if (!\file_exists("phar://madeline.phar$ext/vendor/composer/installed.json")) {
return [];
}
$composer = \json_decode(\file_get_contents('phar://madeline.phar/vendor/composer/installed.json'), true);
$composer = \json_decode(\file_get_contents("phar://madeline.phar$ext/vendor/composer/installed.json"), true) ?: [];
$packages = [];
foreach ($composer as $dep) {
$packages[$dep['name']] = $dep['version_normalized'];
}
return $packages;
};
$previous = $extractVersions();
$previous = [];
if (\file_exists('madeline.phar')) {
\copy('madeline.phar', 'madeline.phar.old');
$previous = $extractVersions('.old');
\unlink('madeline.phar.old');
}
$previous['danog/madelineproto'] = 'old';
\file_put_contents('madeline.phar', $phar);

View File

@ -1 +1 @@
c0a0c693e3d2820cd54ae8571477b2d28d8f2ee4-
36495bffe944538839b2aeb446c87ff086b4c32e-