Bugfixes, added tools

* Added missing parameter for hook invocation
* Added pharlite for building fresh.phar
This commit is contained in:
Chris 2022-03-10 02:27:25 +01:00
parent ec1659e96d
commit 0cf2380b7e
2 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ class Refresher
if ($k == rtrim($oo[0],':')) { if ($k == rtrim($oo[0],':')) {
$h = str_ends_with($oo[0],':'); $h = str_ends_with($oo[0],':');
} elseif ($k == rtrim($oo[1],':')) { } elseif ($k == rtrim($oo[1],':')) {
$h = str_ends_with($oo[0],':'); $h = str_ends_with($oo[1],':');
} }
if ($h !== null) { if ($h !== null) {
$parsed[$o] = $h ? $v : true; $parsed[$o] = $h ? $v : true;
@ -293,7 +293,7 @@ class Refresher
public function doUpdate() public function doUpdate()
{ {
$this->log->append("Pulling updated images..."); $this->log->append("Pulling updated images...");
$this->exec("docker-compose pull -q"); $this->exec("docker-compose pull --quiet");
if (!$this->options['pull']) { if (!$this->options['pull']) {
$this->log->append("Refreshing updated containers..."); $this->log->append("Refreshing updated containers...");
$this->exec("docker-compose up -d"); $this->exec("docker-compose up -d");
@ -327,7 +327,7 @@ class Refresher
$msg = "Deploying updated containers:\n* ".join("\n* ", $images); $msg = "Deploying updated containers:\n* ".join("\n* ", $images);
foreach ($this->hooks as $hook) { foreach ($this->hooks as $hook) {
$hook->sendMessage($msg); $hook->sendMessage($msg, []);
} }
} }
@ -348,7 +348,7 @@ class Refresher
private function exec(string $cmdl) private function exec(string $cmdl)
{ {
$this->log->append("$ {$cmdl}"); $this->log->append("\$ {$cmdl}");
$fd = popen($cmdl." 2>&1","r"); $fd = popen($cmdl." 2>&1","r");
while (!feof($fd)) { while (!feof($fd)) {
$s = rtrim(fgets($fd)); $s = rtrim(fgets($fd));

BIN
tools/pharlite Executable file

Binary file not shown.