Deploy: prune vendor translations/tests/docs to stay within Strato's file quota

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 17:06:04 +02:00
1 parent 33dde2027b
commit 669fb45731
1 file changed
+13
+13
View File
@@ -171,6 +171,18 @@ upload() {
fi
}
# Strato limits the number of files per package (inode quota), and every release carries ~19,000 files.
# Removes what the application never loads at runtime: translations other than de/en, tests and docs.
prune_vendor() {
local before
before="$(find vendor -type f | wc -l)"
find vendor -mindepth 5 -maxdepth 5 -type d -path '*/resources/lang/*' ! -name de ! -name en -exec rm -rf {} +
find vendor/nesbot/carbon/src/Carbon/Lang -type f ! -name 'de*' ! -name 'en*' -delete 2>/dev/null || true
find vendor -mindepth 3 -maxdepth 3 -type d \( -name tests -o -name docs -o -name .github \) -exec rm -rf {} +
find vendor -type f \( -iname '*.md' -o -name 'phpunit.xml*' -o -name '.gitattributes' -o -name '.editorconfig' \) -delete
echo "vendor: $before → $(find vendor -type f | wc -l) Dateien"
}
build() {
say "Baue Version aus Git-Stand $(git -C "$ROOT" rev-parse --short HEAD)"
if [[ -n "$(git -C "$ROOT" status --porcelain)" ]]; then
@@ -185,6 +197,7 @@ build() {
npm ci --no-audit --no-fund
npm run build
rm -rf node_modules tests docs .gitea .github scripts storage .env.example .env.production.example .ai .claude .cursor AGENTS.md CLAUDE.md boost.json phpunit.xml
prune_vendor
git -C "$ROOT" rev-parse HEAD > REVISION
)
ARCHIVE="$BUILD_DIR.tgz"