Gruppen-Plugin 1.0.0
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
5bdfb8a082
49 changed files with 4679 additions and 0 deletions
29
bin/package
Executable file
29
bin/package
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Baut gruppen-<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}/gruppen-{$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(), 'gruppen/'.$relative);
|
||||
}
|
||||
|
||||
$zip->close();
|
||||
echo "Paket: {$target}\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue