Release 5.0.41 - Report only upgraded packages

This commit is contained in:
Travis CI User 2020-01-18 18:13:15 +00:00
parent ed092b414e
commit 43b9d2b356
5 changed files with 25 additions and 7 deletions

BIN
madeline-5.0.41.phar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -82,18 +82,35 @@ 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')) {
return array();
}
$composer = \json_decode(\file_get_contents('phar://madeline.phar/vendor/composer/installed.json'), true);
$packages = array();
foreach ($composer as $dep) {
$packages[$dep['name']] = $dep['version_normalized'];
}
return $packages;
};
$previous = $extractVersions();
$previous['danog/madelineproto'] = 'old';
\file_put_contents('madeline.phar', $phar);
\file_put_contents('madeline.phar.version', $release);
$composer = \json_decode(\file_get_contents('phar://madeline.phar/vendor/composer/installed.json'), true);
$postData = ['downloads' => []];
foreach ($composer as $dep) {
$current = $extractVersions();
$postData = array('downloads' => array());
foreach ($current as $name => $version) {
if (isset($previous[$name]) && $previous[$name] === $version) {
continue;
}
$postData['downloads'][] = [
'name' => $dep['name'],
'version' => $dep['version_normalized']
'name' => $name,
'version' => $version
];
}
$opts = ['http' =>
[
'method' => 'POST',

View File

@ -1 +1 @@
f01871a0e8181cfc0056fa5efabc30309d06fd0d-
0003ada3ff4de9114b5a8b04f5362f549d45c8ed-

1
release-5.0.41 Normal file
View File

@ -0,0 +1 @@
0003ada3ff4de9114b5a8b04f5362f549d45c8ed-