Release stable - Remove some hacks

This commit is contained in:
Github Actions 2023-01-19 21:10:15 +01:00
parent d5e3792c1e
commit 13c3569c5d
7 changed files with 15 additions and 15 deletions

View File

@ -65,6 +65,7 @@ class Installer
}
$this->version = (string) \min(81, (int) (PHP_MAJOR_VERSION.PHP_MINOR_VERSION));
\define('MADELINE_PHAR_GLOB', \getcwd().DIRECTORY_SEPARATOR."madeline*-{$this->version}.phar");
\define('MADELINE_PHAR_VERSION', \getcwd().DIRECTORY_SEPARATOR."madeline.version");
\define('MADELINE_RELEASE_URL', \sprintf(self::RELEASE_TEMPLATE, $this->version));
}
@ -201,23 +202,22 @@ class Installer
*/
public function install()
{
$remote_release = \file_get_contents(MADELINE_RELEASE_URL) ?: null;
$madeline_phar = "madeline-$remote_release.phar";
$madeline_version = "madeline-{$this->version}.phar.version";
if (\file_exists($madeline_version)) {
$local_release = \file_get_contents($madeline_version) ?: null;
if (\file_exists(MADELINE_PHAR_VERSION)) {
$local_release = \file_get_contents(MADELINE_PHAR_VERSION) ?: null;
} else {
\touch($madeline_version);
\touch(MADELINE_PHAR_VERSION);
$local_release = null;
}
\define('HAD_MADELINE_PHAR', !!$local_release);
if (($remote_release === $local_release && \file_exists($madeline_phar)) || $remote_release === null) {
if ($local_release !== null) {
return self::load($local_release);
}
if (!$this->lock($madeline_version)) {
$remote_release = \file_get_contents(MADELINE_RELEASE_URL) ?: null;
$madeline_phar = "madeline-$remote_release.phar";
if (!$this->lock(MADELINE_PHAR_VERSION)) {
\flock($this->lockInstaller, LOCK_EX);
return $this->install();
}

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-71
3742edd8d52bb24683774c29bfa52a1242760080-71

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-72
3742edd8d52bb24683774c29bfa52a1242760080-72

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-73
3742edd8d52bb24683774c29bfa52a1242760080-73

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-74
3742edd8d52bb24683774c29bfa52a1242760080-74

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-80
3742edd8d52bb24683774c29bfa52a1242760080-80

View File

@ -1 +1 @@
be335276e108d3064a8492f4ea4c131bf434c091-81
3742edd8d52bb24683774c29bfa52a1242760080-81