tools: add update_gitea_releases.py and release-notes snippets
One-shot script to backfill Gitea release bodies for existing releases using the Gitea API. Reads per-version Markdown files from tools/release-notes/ and PATCHes each release body. Includes README.md in tools/release-notes/ explaining usage.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# update_gitea_releases.py
|
||||
|
||||
Script one-shot per aggiornare il body delle release Gitea esistenti con il testo del CHANGELOG.
|
||||
|
||||
## Quando usarlo
|
||||
|
||||
Il workflow `release.yml` aggiorna automaticamente il body delle release **nuove** su Gitea.
|
||||
Questo script serve per le release **già esistenti**, create prima che quella funzionalità fosse aggiunta.
|
||||
|
||||
## Prerequisiti
|
||||
|
||||
- Python 3.8+
|
||||
- Un Gitea API token con permesso **Repository → Read and Write**
|
||||
|
||||
### Creare il token su Gitea
|
||||
|
||||
1. Gitea → avatar → **Settings** → **Applications**
|
||||
2. Sezione **"Manage Access Tokens"** → nome a piacere (es. `release-body-update`)
|
||||
3. Permission: **Repository** → `Read and Write`
|
||||
4. **Generate Token** → copia il valore (mostrato una sola volta)
|
||||
|
||||
## Uso
|
||||
|
||||
```bash
|
||||
# Tramite variabile d'ambiente
|
||||
GITEA_TOKEN=<token> python3 tools/update_gitea_releases.py
|
||||
|
||||
# Tramite argomento
|
||||
python3 tools/update_gitea_releases.py --token <token>
|
||||
```
|
||||
|
||||
## Output atteso
|
||||
|
||||
```
|
||||
[v2.0.0] recupero release... id=1, aggiorno body... OK
|
||||
[v2.0.1] recupero release... id=2, aggiorno body... OK
|
||||
[v2.1.0] recupero release... id=3, aggiorno body... OK
|
||||
[v2.2.0] recupero release... id=4, aggiorno body... OK
|
||||
[v2.2.1] recupero release... id=5, aggiorno body... OK
|
||||
```
|
||||
|
||||
Se una release non esiste su Gitea per quel tag, la riga mostra `SALTATO`.
|
||||
|
||||
## Come funziona
|
||||
|
||||
Per ogni file `tools/release-notes/vX.Y.Z.md`:
|
||||
|
||||
1. Chiama `GET /api/v1/repos/{owner}/{repo}/releases/tags/vX.Y.Z` per ottenere l'ID
|
||||
2. Chiama `PATCH /api/v1/repos/{owner}/{repo}/releases/{id}` con il body del file `.md`
|
||||
|
||||
## Aggiungere nuove versioni
|
||||
|
||||
Crea un file `tools/release-notes/vX.Y.Z.md` con il contenuto desiderato, poi riesegui lo script.
|
||||
Per le release future il workflow lo fa automaticamente — questo script non è necessario.
|
||||
@@ -0,0 +1,8 @@
|
||||
### Added
|
||||
- Prima release come repository indipendente
|
||||
- Build script unificato (`build_plugin.py`) con CLI canonica
|
||||
- CI/CD via GitHub Actions (mirror automatico Gitea → GitHub)
|
||||
- Documentazione completa (README, CONTRIBUTING, SECURITY)
|
||||
|
||||
---
|
||||
_Repository primario: vedi link Gitea nel README. Il mirror GitHub è generato automaticamente._
|
||||
@@ -0,0 +1,8 @@
|
||||
### Fixed
|
||||
- Restored `tools/legacy/` build scripts lost from repository
|
||||
- Fixed `UnicodeEncodeError` on CI: replaced Unicode checkmarks with ASCII OK/FAIL in build summary
|
||||
- Fixed MSB8020 toolset error on GitHub Actions: `build_plugin_2600_vs2026.py` now detects the installed VS toolset dynamically (falls back to v143 on VS2022 runners)
|
||||
- Build script for 26.00 selects `Nsis7z_vs2026.vcxproj` (v145) or `Nsis7z.vcxproj` (v143) based on detected toolset
|
||||
|
||||
---
|
||||
_Repository primario: vedi link Gitea nel README. Il mirror GitHub è generato automaticamente._
|
||||
@@ -0,0 +1,13 @@
|
||||
### Added
|
||||
- NSIS plugin API (`pluginapi.cpp`/`pluginapi.h`) for 7-Zip zstd build
|
||||
- `ExtractCallbackConsole` class for extraction progress and user input
|
||||
- Main extraction logic (`Main.cpp`, `MainAr.cpp`) for the zstd bundle
|
||||
- User input utilities (`UserInputUtils2`) for password handling and prompts
|
||||
- Break signal handling (`NSISBreak`) for graceful interruption
|
||||
- `Nsis7z_vs2026.vcxproj` (v145 toolset) for Visual Studio 2026 builds
|
||||
- `tools/fix_vcxproj.py` helper for project file patching
|
||||
- `versions/7-zip-zstd` submodule added
|
||||
- `build_zstd.cmd` top-level build script for the zstd variant
|
||||
|
||||
---
|
||||
_Repository primario: vedi link Gitea nel README. Il mirror GitHub è generato automaticamente._
|
||||
@@ -0,0 +1,11 @@
|
||||
### Added
|
||||
- Linux MinGW-w64 cross-build support in `build_plugin.py` via `--host linux`
|
||||
- `tools/linux/build_plugin_linux.py` for standalone Linux builds
|
||||
- Color output and progress spinner in all legacy build scripts
|
||||
|
||||
### Changed
|
||||
- `build_plugin.py` now supports both Windows (MSBuild) and Linux (MinGW-w64) targets
|
||||
- Windows build-script f-string fixes
|
||||
|
||||
---
|
||||
_Repository primario: vedi link Gitea nel README. Il mirror GitHub è generato automaticamente._
|
||||
@@ -0,0 +1,8 @@
|
||||
### Added
|
||||
- Linux CI jobs for the GitHub `build` and `release` workflows using the MinGW-w64 cross-build path
|
||||
|
||||
### Changed
|
||||
- GitHub Actions workflows now opt into Node 24 for JavaScript-based actions to avoid Node 20 deprecation warnings
|
||||
|
||||
---
|
||||
_Repository primario: vedi link Gitea nel README. Il mirror GitHub è generato automaticamente._
|
||||
Reference in New Issue
Block a user