Files
InvoiceShelf/Makefile
Darko Gjorgjijoski 525f432ee0 Replace deleted_files with manifest-based updater cleanup, add release workflow
- Add manifest.json generation script (scripts/generate-manifest.php)
- Add Updater::cleanStaleFiles() that removes files not in manifest
- Add /api/v1/update/clean endpoint with backward compatibility
- Add configurable update_protected_paths in config/invoiceshelf.php
- Update frontend to use clean step instead of delete step
- Add GitHub Actions release workflow triggered on version tags
- Add .github/release.yml for auto-generated changelog categories
- Update Makefile to include manifest generation and scripts directory

Backport from v3.0 (e6452946). Adapted for master's existing structure: master uses one-controller-per-action under app/Http/Controllers/V1/Admin/Update/, so the new endpoint is implemented as a dedicated CleanFilesController matching the existing DeleteFilesController/CopyFilesController/etc. pattern instead of v3.0's unified UpdateController. The legacy /update/delete route and DeleteFilesController are retained for compatibility — only the frontend (resources/scripts/admin/views/settings/UpdateAppSetting.vue) is updated to call /update/clean. Updater service lives at app/Space/Updater.php on master (not yet refactored to app/Services/Update/Updater.php like v3.0).
2026-04-07 18:13:44 +02:00

76 lines
2.7 KiB
Makefile

.PHONY: dist-gen dist-clean dist clean test
composer:
rm -r vendor 2> /dev/null || true
composer install --prefer-dist --no-dev
npm-build:
rm -r public/build 2> /dev/null || true
rm -r node_modules 2> /dev/null || true
npm install
npm run build
dist-gen: clean composer npm-build
@echo "packaging..."
@mkdir InvoiceShelf
@mkdir InvoiceShelf/public
@cp -r app InvoiceShelf
@cp -r bootstrap InvoiceShelf
@cp -r config InvoiceShelf
@cp -r database InvoiceShelf
@cp -r public/build InvoiceShelf/public
@cp -r public/favicons InvoiceShelf/public
@cp -r public/.htaccess InvoiceShelf/public
@cp -r public/index.php InvoiceShelf/public
@cp -r public/robots.txt InvoiceShelf/public
@cp -r public/web.config InvoiceShelf/public
@cp -r resources InvoiceShelf
@cp -r lang InvoiceShelf
@cp -r routes InvoiceShelf
@cp -r storage InvoiceShelf
@cp -r vendor InvoiceShelf 2> /dev/null || true
@cp -r scripts InvoiceShelf
@cp -r version.md InvoiceShelf
@cp -r .env.example InvoiceShelf
@cp -r artisan InvoiceShelf
@cp -r composer.json InvoiceShelf
@cp -r composer.lock InvoiceShelf
@cp -r LICENSE InvoiceShelf
@cp -r readme.md InvoiceShelf
@cp -r SECURITY.md InvoiceShelf
@cp -r server.php InvoiceShelf
@touch InvoiceShelf/storage/logs/laravel.log
dist-clean: dist-gen
find InvoiceShelf -wholename '*/[Tt]ests/*' -delete
find InvoiceShelf -wholename '*/[Tt]est/*' -delete
@rm -r InvoiceShelf/storage/framework/cache/data/* 2> /dev/null || true
@rm InvoiceShelf/storage/framework/sessions/* 2> /dev/null || true
@rm InvoiceShelf/storage/framework/views/* 2> /dev/null || true
@rm InvoiceShelf/storage/logs/* 2> /dev/null || true
@php scripts/generate-manifest.php InvoiceShelf
dist: dist-clean
@zip -r InvoiceShelf.zip InvoiceShelf
clean:
@rm build/* 2> /dev/null || true
@rm -r InvoiceShelf 2> /dev/null || true
@rm -r public/build 2> /dev/null || true
@rm -r node_modules 2> /dev/null || true
@rm -r vendor 2> /dev/null || true
install: composer npm-build
php artisan migrate
test:
@if [ -x "vendor/bin/pest" ]; then \
./vendor/bin/pest --stop-on-failure; \
else \
echo ""; \
echo "Please install pest:"; \
echo ""; \
echo " composer install"; \
echo ""; \
fi