Added: support plugins als .phar files

This commit is contained in:
djmaze 2021-03-04 11:56:26 +01:00
parent 46ff83c41d
commit 1e13725768
4 changed files with 77 additions and 22 deletions

View file

@ -52,6 +52,15 @@ if (isset($options['plugins'])) {
$tar->compress(Phar::GZ);
unlink($tar_destination);
rename("{$tar_destination}.gz", $tgz_destination);
if (Phar::canWrite()) {
$phar_destination = "{$destPath}{$name}.phar";
@unlink($phar_destination);
$tar = new Phar($phar_destination);
$tar->buildFromDirectory("./plugins/{$name}/");
$tar->compress(Phar::GZ);
unlink($phar_destination);
rename("{$phar_destination}.gz", $phar_destination);
}
} else {
echo "- {$name} {$version}\n";
}