mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Minor fixes for Grav updater
This commit is contained in:
parent
ecb2d31df0
commit
ae74f29b69
|
|
@ -36,9 +36,11 @@ final class Install
|
|||
'php' => [
|
||||
'name' => 'PHP',
|
||||
'versions' => [
|
||||
'7.4' => '7.4.0',
|
||||
'8.1' => '8.1.0',
|
||||
'8.0' => '8.0.0',
|
||||
'7.4' => '7.4.1',
|
||||
'7.3' => '7.3.6',
|
||||
'' => '7.4.12'
|
||||
'' => '8.0.13'
|
||||
]
|
||||
],
|
||||
'grav' => [
|
||||
|
|
@ -114,7 +116,7 @@ final class Install
|
|||
/** @var string|null */
|
||||
private $location;
|
||||
|
||||
/** @var VersionUpdater */
|
||||
/** @var VersionUpdater|null */
|
||||
private $updater;
|
||||
|
||||
/** @var static */
|
||||
|
|
@ -250,6 +252,11 @@ ERR;
|
|||
}
|
||||
|
||||
try {
|
||||
if (null === $this->updater) {
|
||||
$versions = Versions::instance(USER_DIR . 'config/versions.yaml');
|
||||
$this->updater = new VersionUpdater('core/grav', __DIR__ . '/updates', $this->getVersion(), $versions);
|
||||
}
|
||||
|
||||
// Update user/config/version.yaml before copying the files to avoid frontend from setting the version schema.
|
||||
$this->updater->install();
|
||||
|
||||
|
|
@ -280,7 +287,7 @@ ERR;
|
|||
public function finalize(): void
|
||||
{
|
||||
// Finalize can be run without installing Grav first.
|
||||
if (!$this->updater) {
|
||||
if (null === $this->updater) {
|
||||
$versions = Versions::instance(USER_DIR . 'config/versions.yaml');
|
||||
$this->updater = new VersionUpdater('core/grav', __DIR__ . '/updates', GRAV_VERSION, $versions);
|
||||
$this->updater->install();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ final class VersionUpdate
|
|||
|
||||
public function getPatch(): string
|
||||
{
|
||||
return $this->date;
|
||||
return $this->patch;
|
||||
}
|
||||
|
||||
public function getUpdater(): VersionUpdater
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user