Release 5.0.41 - Report only upgraded packages
This commit is contained in:
parent
ed092b414e
commit
43b9d2b356
BIN
madeline-5.0.41.phar
Normal file
BIN
madeline-5.0.41.phar
Normal file
Binary file not shown.
BIN
madeline.phar
BIN
madeline.phar
Binary file not shown.
29
phar.php
29
phar.php
@ -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',
|
||||
|
2
release
2
release
@ -1 +1 @@
|
||||
f01871a0e8181cfc0056fa5efabc30309d06fd0d-
|
||||
0003ada3ff4de9114b5a8b04f5362f549d45c8ed-
|
1
release-5.0.41
Normal file
1
release-5.0.41
Normal file
@ -0,0 +1 @@
|
||||
0003ada3ff4de9114b5a8b04f5362f549d45c8ed-
|
Loading…
Reference in New Issue
Block a user