mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-04-13 08:28:32 +00:00
feat(docs): update deleted files section in release checklist for clarity and automation details
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
## 📚 Navigation
|
||||
|
||||
* [🔢 1. Update Version](#1-update-version)
|
||||
* [🧹 2. Deleted Files (Automated)](#2-deleted-files-automated)
|
||||
* [🧹 2. Deleted Files](#2-deleted-files)
|
||||
* [🧪 3. Pre-Release Validation](#3-pre-release-validation)
|
||||
* [⚙️ 4. Build Archives](#4-build-archives)
|
||||
* [📝 5. Changelog](#5-changelog)
|
||||
@@ -47,17 +47,33 @@ git push
|
||||
|
||||
---
|
||||
|
||||
## 🧹 2. Deleted Files (Automated)
|
||||
## 🧹 2. Deleted Files
|
||||
|
||||
File cleanup is **fully automated**. No manual steps required.
|
||||
Before building, generate the list of files to delete on update:
|
||||
|
||||
**How it works:**
|
||||
```bash
|
||||
make generate_deleted_files
|
||||
```
|
||||
|
||||
1. `make main` / `make lb` internally runs `delete_files_list` / `lb_delete_files_list`
|
||||
2. This generates `migrations/deleted_files.txt` inside the archive (diff of deleted files since last tag)
|
||||
3. During `php console.php update post-update`, `MigrationRunner::runFileCleanup()` reads it and deletes the listed files automatically
|
||||
This runs `git diff` between `LAST_TAG` and `HEAD`, extracts deleted files under `src/`, strips the `src/` prefix, and writes the result to `src/migrations/deleted_files.txt`.
|
||||
|
||||
> ⚠️ **Review only:** After building, inspect `dist/migrations/deleted_files.txt` to verify no critical files are listed by mistake.
|
||||
If `LAST_TAG` cannot be auto-detected (no network / no releases), pass it explicitly:
|
||||
|
||||
```bash
|
||||
make generate_deleted_files LAST_TAG=1.2.16
|
||||
```
|
||||
|
||||
**Review the generated file** — verify no critical files are listed by mistake:
|
||||
|
||||
```bash
|
||||
cat src/migrations/deleted_files.txt
|
||||
```
|
||||
|
||||
After validation, `make main` / `make lb` will pack the file into the archive via `delete_files_list` / `lb_delete_files_list`.
|
||||
|
||||
During `php console.php update post-update`, `MigrationRunner::runFileCleanup()` reads it and deletes the listed files automatically.
|
||||
|
||||
> ⚠️ Lines starting with `#` are comments and will be ignored. You can comment out files you want to keep.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## 📚 Навигация
|
||||
|
||||
- [🔢 1. Обновить версию](#1-обновить-версию)
|
||||
- [🧹 2. Удалённые файлы (автоматически)](#2-удалённые-файлы-автоматически)
|
||||
- [🧹 2. Удалённые файлы](#2-удалённые-файлы)
|
||||
- [🧪 3. Предрелизная проверка](#3-предрелизная-проверка)
|
||||
- [⚙️ 4. Сборка архивов](#4-сборка-архивов)
|
||||
- [📝 5. Changelog](#5-changelog)
|
||||
@@ -47,16 +47,33 @@ git push
|
||||
|
||||
---
|
||||
|
||||
## 🧹 2. Удалённые файлы (автоматически)
|
||||
## 🧹 2. Удалённые файлы
|
||||
|
||||
Очистка файлов **полностью автоматизирована**. Ручных шагов не требуется.
|
||||
Перед сборкой сгенерируйте список файлов для удаления при обновлении:
|
||||
|
||||
**Как это работает:**
|
||||
1. `make main` / `make lb` внутри вызывает `delete_files_list` / `lb_delete_files_list`
|
||||
2. Генерируется `migrations/deleted_files.txt` внутри архива (diff удалённых файлов с последнего тега)
|
||||
3. При `php console.php update post-update` вызывается `MigrationRunner::runFileCleanup()`, который автоматически удаляет перечисленные файлы
|
||||
```bash
|
||||
make generate_deleted_files
|
||||
```
|
||||
|
||||
> ⚠️ **Только проверка:** после сборки просмотрите `dist/migrations/deleted_files.txt` — убедитесь, что в списке нет критичных файлов.
|
||||
Команда запускает `git diff` между `LAST_TAG` и `HEAD`, находит удалённые файлы под `src/`, убирает префикс `src/` и записывает результат в `src/migrations/deleted_files.txt`.
|
||||
|
||||
Если `LAST_TAG` не определяется автоматически (нет сети / нет релизов), передайте явно:
|
||||
|
||||
```bash
|
||||
make generate_deleted_files LAST_TAG=1.2.16
|
||||
```
|
||||
|
||||
**Проверьте сгенерированный файл** — убедитесь, что в списке нет критичных файлов:
|
||||
|
||||
```bash
|
||||
cat src/migrations/deleted_files.txt
|
||||
```
|
||||
|
||||
После валидации `make main` / `make lb` упакуют файл в архив через `delete_files_list` / `lb_delete_files_list`.
|
||||
|
||||
При `php console.php update post-update` вызывается `MigrationRunner::runFileCleanup()`, который автоматически удаляет перечисленные файлы.
|
||||
|
||||
> ⚠️ Строки, начинающиеся с `#`, являются комментариями и будут проигнорированы. Можно закомментировать файлы, которые нужно сохранить.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user