inhaus-plugin-verleih/bin/package
Friederich Loheide 14aaa16b30 Verleih 1.0.0: Verleihsystem für Inhaus
Übersicht mit Status und Standort, Anfragen im Portal (Benachrichtigung +
E-Mail ans Team), Zusagen/Absagen mit automatischem Eintrag, Zurücknehmen,
Recht „Verleih verwalten“, einstellbare Bezeichnungen und Übernahme aus dem
WordPress-Plugin „FL-Verleihsystem“ (WXR mit Bildern).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 15:17:47 +00:00

29 lines
999 B
PHP
Executable file

#!/usr/bin/env php
<?php
/**
* Baut verleih-<version>.zip zum Hochladen unter Administration → Plugins.
* Enthält alles außer Quelltexten fürs Frontend-Build und node_modules.
*/
$root = dirname(__DIR__);
$manifest = json_decode(file_get_contents("{$root}/plugin.json"), true);
$target = "{$root}/verleih-{$manifest['version']}.zip";
$skip = ['node_modules', '.git', 'inhaus-sdk', 'package.json', 'package-lock.json', 'vite.config.js', basename($target)];
@unlink($target);
$zip = new ZipArchive;
$zip->open($target, ZipArchive::CREATE);
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root, FilesystemIterator::SKIP_DOTS));
foreach ($files as $file) {
$relative = substr($file->getPathname(), strlen($root) + 1);
if (in_array(explode(DIRECTORY_SEPARATOR, $relative)[0], $skip, true) || str_ends_with($relative, '.zip')) {
continue;
}
$zip->addFile($file->getPathname(), 'verleih/'.$relative);
}
$zip->close();
echo "Paket: {$target}\n";