Monatsspruch 1.0.0
Monatsspruch der ÖAB als Startseiten-Kachel für Inhaus (ab 0.12.0): automatischer Abruf von oeab.de, eigene Angaben je Monat, Admin-Seite, Packskript für das installierbare ZIP, Tests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
cb27dad0e6
10 changed files with 2262 additions and 0 deletions
26
bin/package
Executable file
26
bin/package
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
// Baut das installierbare ZIP: dist/monatsspruch-<version>.zip
|
||||
// Hochladen unter Administration → Plugins → „Plugin hochladen“, dann aktivieren.
|
||||
|
||||
$root = dirname(__DIR__);
|
||||
$manifest = json_decode(file_get_contents("$root/plugin.json"), true);
|
||||
@mkdir("$root/dist");
|
||||
$target = "$root/dist/{$manifest['slug']}-{$manifest['version']}.zip";
|
||||
@unlink($target);
|
||||
|
||||
$zip = new ZipArchive;
|
||||
$zip->open($target, ZipArchive::CREATE);
|
||||
|
||||
foreach (['plugin.json', 'README.md'] as $file) {
|
||||
$zip->addFile("$root/$file", "{$manifest['slug']}/$file");
|
||||
}
|
||||
|
||||
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("$root/src", FilesystemIterator::SKIP_DOTS));
|
||||
|
||||
foreach ($files as $file) {
|
||||
$zip->addFile($file->getPathname(), $manifest['slug'].'/src/'.substr($file->getPathname(), strlen("$root/src/")));
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
echo 'dist/'.basename($target).PHP_EOL;
|
||||
Loading…
Add table
Add a link
Reference in a new issue