feat: add changelog.json for version 2.1.0 and update release preparation checklist

This commit is contained in:
Divarion-D
2026-04-12 17:47:56 +03:00
parent b4b692b2aa
commit 5dd6eee765
4 changed files with 63 additions and 45 deletions

38
changelog.json Normal file
View File

@@ -0,0 +1,38 @@
{
"version": "2.1.0",
"changes": [
"Unified install and update into a single archive",
"Added full module system with admin UI",
"Enhanced module upload UI with drag-and-drop and AJAX support",
"Added Redis diagnostics tool",
"Added EventDispatcher integration into bootstrap and module loader",
"Added new core/domain architecture classes and migrated libraries",
"Added distribution-specific binary downloads for LB",
"Added transcoding support based on profile ID in WatchItem",
"Improved i18n system with 800+ translation keys and English fallback",
"Removed hardcoded English strings in views",
"Improved admin UI layout width to 1440px",
"Improved Redis handling with type hints, null-safety and health checks",
"Improved contributors update system",
"Added shared JavaScript utilities for admin pages",
"Fixed null-safety issues across admin, API, streaming and cron",
"Fixed language retrieval in database and settings views",
"Fixed TMDB include paths",
"Fixed tracker proxy_id handling",
"Fixed streaming behavior preserving IP URLs when domain inactive",
"Fixed cookie handling with headers_sent check",
"Fixed api_key validation in UserService",
"Fixed dark mode rendering in server view",
"Removed legacy proxy functions and migrated to direct class calls",
"Refactored streaming logic to remove globals from parameters",
"Refactored Redis handling and GitHubReleases logic",
"Overhauled installer removing php-ssh2 and improving security",
"Updated ARCHITECTURE.md and MIGRATION.md",
"Improved documentation and release checklists",
"Added development workflow documentation",
"Removed obsolete Redis binaries and legacy scripts",
"Switched to static redis.conf template",
"Cleaned up Makefile and build system",
"Merged PR #104 and main branch updates"
]
}

View File

@@ -132,19 +132,20 @@ echo "Previous release: $PREV_TAG"
git log --pretty=format:"- %s (%h)" "$PREV_TAG"..main > dist/changes.md
```
**Update the public changelog** at:
[XC_VM_Update/changelog.json](https://github.com/Vateron-Media/XC_VM_Update/blob/main/changelog.json)
**Update `changelog.json`** in the repository root — this file contains only the changes for the upcoming release:
```json
{
"version": "X.Y.Z",
"changes": [
"Description of change 1",
"Description of change 2"
"Description of change 1",
"Description of change 2"
]
}
```
The panel fetches this file from the release tag automatically via `GithubReleases::getChangelog()`.
> 💬 Keep descriptions concise — focus on user-facing improvements and fixes.
---
@@ -170,5 +171,4 @@ After publishing, the workflow will automatically:
* [ ] Verify all 4 assets are attached to the release
* [ ] Run `md5sum -c hashes.md5` on downloaded files
* [ ] Check Telegram notification was sent
* [ ] Update `changelog.json` in `XC_VM_Update` repo if not done yet
* [ ] Close related GitHub issues/milestones

View File

@@ -131,19 +131,20 @@ echo "Предыдущий релиз: $PREV_TAG"
git log --pretty=format:"- %s (%h)" "$PREV_TAG"..main > dist/changes.md
```
**Обновить публичный changelog** по ссылке:
[XC_VM_Update/changelog.json](https://github.com/Vateron-Media/XC_VM_Update/blob/main/changelog.json)
**Обновить `changelog.json`** в корне репозитория — этот файл содержит только изменения для предстоящего релиза:
```json
{
"version": "X.Y.Z",
"changes": [
"Описание изменения 1",
"Описание изменения 2"
"Описание изменения 1",
"Описание изменения 2"
]
}
```
Панель получает этот файл из тега релиза автоматически через `GithubReleases::getChangelog()`.
> 💬 Описания должны быть краткими — фокус на пользовательских улучшениях и исправлениях.
---
@@ -169,5 +170,4 @@ git log --pretty=format:"- %s (%h)" "$PREV_TAG"..main > dist/changes.md
- [ ] Проверить, что все 4 файла прикреплены к релизу
- [ ] Скачать и проверить `md5sum -c hashes.md5`
- [ ] Убедиться, что Telegram-уведомление отправлено
- [ ] Обновить `changelog.json` в репозитории `XC_VM_Update` (если ещё не сделано)
- [ ] Закрыть связанные GitHub issues/milestones

View File

@@ -231,46 +231,27 @@ class GitHubReleases {
}
/**
* Retrieve the changelog for all releases from changelog.json files in JSON format.
* Retrieve the changelog for a specific release from its changelog.json.
*
* @param string $changelog_file_url Link to file with changelog.
* @return array A JSON-compatible array containing the changelog.
* The file is fetched from the repository at the given tag via raw.githubusercontent.
* It contains a single object: {"version": "X.Y.Z", "changes": [...]}.
*
* @param string $version The release tag to fetch the changelog for.
* @return array A JSON-compatible array containing the changelog entry wrapped in an array.
*/
public function getChangelog(string $changelog_file_url): array {
public function getChangelog(string $version): array {
try {
if (!$this->isCacheValid()) {
$response = $this->makeRequest($this->api_url);
$data = json_decode($response, true);
if ($data === null) {
throw new Exception("Failed to parse API response: " . json_last_error_msg());
}
$this->saveCache($data);
error_log("Updated cache for {$this->owner}/{$this->repo}");
}
$releases = $this->loadCache();
if ($releases === null) {
error_log("Invalid cache, unable to proceed");
return [];
}
$response = $this->makeRequest($changelog_file_url);
$url = "https://raw.githubusercontent.com/{$this->owner}/{$this->repo}/refs/tags/{$version}/changelog.json";
$response = $this->makeRequest($url);
$changelog = json_decode($response, true);
if ($changelog === null) {
error_log("Failed to parse changelog JSON");
error_log("Failed to parse changelog JSON for version {$version}");
return [];
}
$valid_versions = array_map(function ($release) {
return $release['tag_name'] ?? '';
}, $releases);
$filtered_changelog = array_filter($changelog, function ($entry) use ($valid_versions) {
return in_array($entry['version'] ?? '', $valid_versions);
});
$filtered_changelog = array_values($filtered_changelog);
error_log("Successfully retrieved changelog with " . count($filtered_changelog) . " versions after filtering (original: " . count($changelog) . " versions)");
return $filtered_changelog;
error_log("Successfully retrieved changelog for version {$version} with " . count($changelog['changes'] ?? []) . " changes");
return [$changelog];
} catch (Exception $e) {
error_log("Failed to fetch changelog: " . $e->getMessage());
error_log("Failed to fetch changelog for version {$version}: " . $e->getMessage());
return [];
}
}
@@ -412,8 +393,7 @@ class GitHubReleases {
return null;
}
$changelogUrl = "https://raw.githubusercontent.com/{$this->owner}/{$this->repo}_Update/refs/heads/main/changelog.json";
$changelog = $this->getChangelog($changelogUrl);
$changelog = $this->getChangelog($latest_version);
$url = "https://github.com/{$this->owner}/{$this->repo}/releases/tag/{$latest_version}";
@@ -549,7 +529,7 @@ class GitHubReleases {
* ------------------------------------------------------------
* 4. Загрузить changelog:
*
* $changelog = $gh->getChangelog("https://raw.githubusercontent.com/Vateron-Media/XC_VM_Update/refs/heads/main/changelog.json");
* $changelog = $gh->getChangelog("1.2.0");
* print_r($changelog);
*
* ------------------------------------------------------------