mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit a52ae94f4dc9db167b1c28c48c3d676658f88088
parent 275637869e6d6e8b330a86d17b7188317270a564
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 12 Oct 2022 16:44:20 +0200

Updated installer

Diffstat:
M.github/workflows/tests.yml | 2++
Msystem/extensions/install.php | 13+++++++------
Msystem/extensions/update-current.ini | 4++--
3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml @@ -22,6 +22,8 @@ jobs: tools: none - name: Set up problem matcher run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" + - name: Set up tests + run: php yellow.php skip installation - name: Run tests run: php yellow.php build tests env: diff --git a/system/extensions/install.php b/system/extensions/install.php @@ -2,7 +2,7 @@ // Install extension, https://github.com/annaesvensson/yellow-install class YellowInstall { - const VERSION = "0.8.77"; + const VERSION = "0.8.78"; const PRIORITY = "1"; public $yellow; // access to API @@ -77,18 +77,19 @@ class YellowInstall { echo "Datenstrom Yellow is for people who make small websites. https://datenstrom.se/yellow/\n"; echo "Syntax: php yellow.php\n"; echo " php yellow.php about [extension]\n"; - echo " php yellow.php build [directory location]\n"; echo " php yellow.php serve [url]\n"; - } elseif ($command=="build") { + echo " php yellow.php skip installation\n"; + } elseif ($command=="about" || $command=="serve") { + $statusCode = 0; + } elseif ($command=="skip" && $text=="installation") { $statusCode = $this->updateLog(); if ($statusCode==200) $statusCode = $this->updateLanguages(); if ($statusCode==200) $statusCode = $this->updateSettings(); if ($statusCode==200) $statusCode = $this->removeInstall(); - } elseif ($command=="serve" || $command=="about") { $statusCode = 200; } else { $statusCode = 304; - echo "The installation has not been completed. Please type 'php yellow.php serve'.\n"; + echo "The installation has not been completed. Please type 'php yellow.php serve' or 'php yellow.php skip installation`.\n"; } if ($statusCode>=400) { echo "ERROR installing files: ".$this->yellow->page->errorMessage."\n"; @@ -97,12 +98,12 @@ class YellowInstall { } else { $statusCode = $this->removeInstall(); $this->yellow->log($statusCode==200 ? "info" : "error", "Uninstall extension 'Install ".YellowInstall::VERSION."'"); + if ($statusCode==200) $statusCode = 0; if ($statusCode>=400) { echo "ERROR installing files: ".$this->yellow->page->errorMessage."\n"; echo "Detected ZIP-files, 0 extensions installed. Please run command again.\n"; } } - if ($statusCode==200) $statusCode = 0; return $statusCode; } diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -54,11 +54,11 @@ media/images/photo.jpg: photo.jpg, create, optional media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional Extension: Install -Version: 0.8.77 +Version: 0.8.78 Description: Install a brand new, shiny website. DocumentationUrl: https://github.com/annaesvensson/yellow-install DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/install.zip -Published: 2022-10-05 22:02:34 +Published: 2022-10-12 16:23:51 Developer: Anna Svensson Status: unlisted system/extensions/install.php: install.php, create