mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 19:41:36 +01:00
fixes for broken gpm selfupgrade
This commit is contained in:
@@ -38,7 +38,7 @@ class Grav extends AbstractPackageCollection
|
||||
*/
|
||||
public function getAssets()
|
||||
{
|
||||
return $this->data->assets;
|
||||
return $this->data['assets'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,11 +50,11 @@ class Grav extends AbstractPackageCollection
|
||||
public function getChangelog($diff = null)
|
||||
{
|
||||
if (!$diff) {
|
||||
return $this->data->changelog;
|
||||
return $this->data['changelog'];
|
||||
}
|
||||
|
||||
$diffLog = [];
|
||||
foreach ($this->data->changelog as $version => $changelog) {
|
||||
foreach ($this->data['changelog'] as $version => $changelog) {
|
||||
preg_match("/[\d\.]+/", $version, $cleanVersion);
|
||||
|
||||
if (!$cleanVersion || version_compare($diff, $cleanVersion[0], ">=")) { continue; }
|
||||
|
||||
@@ -84,7 +84,7 @@ class SelfupgradeCommand extends Command
|
||||
$this->setupConsole($input, $output);
|
||||
$this->upgrader = new Upgrader($this->input->getOption('force'));
|
||||
|
||||
|
||||
$update = $this->upgrader->getAssets()['grav-update'];
|
||||
|
||||
$local = $this->upgrader->getLocalVersion();
|
||||
$remote = $this->upgrader->getRemoteVersion();
|
||||
@@ -95,8 +95,6 @@ class SelfupgradeCommand extends Command
|
||||
exit;
|
||||
}
|
||||
|
||||
$update = $this->upgrader->getAssets()->{'grav-update'};
|
||||
|
||||
$questionHelper = $this->getHelper('question');
|
||||
$skipPrompt = $this->input->getOption('all-yes');
|
||||
|
||||
@@ -141,7 +139,7 @@ class SelfupgradeCommand extends Command
|
||||
$this->output->writeln("");
|
||||
$this->output->writeln("Preparing to upgrade to v<cyan>$remote</cyan>..");
|
||||
|
||||
$this->output->write(" |- Downloading upgrade [" . $this->formatBytes($update->size) . "]... 0%");
|
||||
$this->output->write(" |- Downloading upgrade [" . $this->formatBytes($update['size']) . "]... 0%");
|
||||
$this->file = $this->download($update);
|
||||
|
||||
$this->output->write(" |- Installing upgrade... ");
|
||||
|
||||
Reference in New Issue
Block a user