Translate scripts, comments and README to English

This commit is contained in:
Demo committed 2026-10-11 20:02:44 +02:00
1 parent 9196e0da4a
commit 3cc2ea573f
7 files changed
+65 -65

No files matched your search

+24 -24
View File
@@ -1,49 +1,49 @@
# Renovate lokal – Proof of Concept (npm + .NET)
# Renovate locally - proof of concept (npm + .NET)
Ein Monorepo, dessen Abhängigkeiten mit der **Renovate-CLI** geprüft und aktualisiert werden –
komplett lokal, ohne GitHub/GitLab. Alle Pakete sind absichtlich veraltet.
A monorepo whose dependencies are checked and updated with the **Renovate CLI** -
fully local, without GitHub/GitLab. All packages are intentionally outdated.
```
npm/web/ package.json + package-lock.json (express, lodash)
npm/utils/ package.json + package-lock.json (dayjs, typescript)
dotnet/ global.json, Directory.Packages.props, .config/dotnet-tools.json, src/{Core,Api}
renovate.json Renovate-Konfiguration: je ein PR für npm und NuGet (inkl. Major)
renovate.json Renovate configuration: one PR for npm and one for NuGet (including major updates)
```
Voraussetzungen: PowerShell, Node.js ≥ 24.11 (z. B. `volta install node@24`), Git, Podman.
Requirements: PowerShell, Node.js >= 24.11 (e.g. `volta install node@24`), Git, Podman.
## Nur prüfen
## Check only
```powershell
.\script\renovate-check.ps1
```
Renovate läuft mit `--platform=local` direkt auf diesem Verzeichnis und listet die verfügbaren Updates.
Diese Plattform kann nur prüfen, keine Dateien ändern.
Renovate runs with `--platform=local` directly on this directory and lists the available updates.
This platform can only check, it cannot change files.
## Aktualisieren
## Update
Damit Renovate Branches und PRs erstellen kann, braucht es einen Git-Server – hier ein lokales **Forgejo** in Podman.
For Renovate to create branches and PRs, a Git server is needed - here a local **Forgejo** in Podman.
```powershell
.\script\forgejo-up.ps1 # Forgejo starten (einmalig bzw. nach Neustart)
.\script\renovate-update.ps1 # Renovate laufen lassen (beliebig oft)
.\script\forgejo-down.ps1 # Forgejo stoppen; mit -Purge inkl. Daten löschen
.\script\forgejo-reset.ps1 # Forgejo komplett zurücksetzen (alle Repos, PRs, Token weg) und neu starten
.\script\forgejo-up.ps1 # start Forgejo (once, or after a reboot)
.\script\renovate-update.ps1 # run Renovate (as often as you like)
.\script\forgejo-down.ps1 # stop Forgejo; with -Purge also delete all data
.\script\forgejo-reset.ps1 # reset Forgejo completely (all repos, PRs, tokens gone) and start fresh
```
- `forgejo-up.ps1` startet Forgejo (`http://localhost:3000`, Login `renovate` / `renovate`),
legt den Bot-User an und speichert ein frisches Access-Token in `script/.forgejo-token`.
- `renovate-update.ps1` kennt Forgejo nur über Endpoint, Repo-Name (`renovate/renovate-test`) und `.forgejo-token`. Es pusht `main`
(das Repo wird beim ersten Push automatisch angelegt), lässt Renovate laufen und holt die Branches als
`forgejo/renovate/*` ins lokale Repo. Jeder Lauf erzeugt **neue Branches + PRs** (je einen für npm und NuGet), z. B. Branch
`renovate/2026-10-11-14-03-22-123-npm` mit PR „Update npm 2026-10-11 14:03:22.123“.
- `forgejo-up.ps1` starts Forgejo (`http://localhost:3000`, login `renovate` / `renovate`),
creates the bot user and stores a fresh access token in `script/.forgejo-token`.
- `renovate-update.ps1` only knows Forgejo by endpoint, repository name (`renovate/renovate-test`) and `.forgejo-token`.
It pushes `main` (the repository is created automatically on the first push), runs Renovate and fetches the
branches into the local repository as `forgejo/renovate/*`. Every run creates **new branches + PRs**
(one for npm, one for NuGet), e.g. branch `renovate/2026-10-11-14-03-22-123-npm` with PR "Update npm 2026-10-11 14:03:22.123".
Übernehmen:
Apply:
```powershell
git diff main...forgejo/renovate/<zeitstempel>-npm
git merge forgejo/renovate/<zeitstempel>-npm
git diff main...forgejo/renovate/<timestamp>-npm
git merge forgejo/renovate/<timestamp>-npm
```
Optional: `$env:GITHUB_COM_TOKEN = '<token>'` – dann schreibt Renovate Release Notes von github.com in die PRs.
Optional: `$env:GITHUB_COM_TOKEN = '<token>'` - Renovate then adds release notes from github.com to the PRs.
+1 -1
View File
@@ -1,5 +1,5 @@
<Project>
<!-- Central Package Management: Versionen werden hier zentral gepflegt (und von Renovate aktualisiert) -->
<!-- Central Package Management: versions are maintained centrally here (and updated by Renovate) -->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
+3 -3
View File
@@ -1,4 +1,4 @@
# Stoppt das lokale Forgejo. Mit -Purge werden zusätzlich Container, Daten-Volume und .forgejo-token gelöscht.
# Stops the local Forgejo. With -Purge, the container, the data volume and .forgejo-token are deleted as well.
param([switch]$Purge)
podman stop renovate-forgejo 2>$null | Out-Null
@@ -6,7 +6,7 @@ if ($Purge) {
podman rm -f renovate-forgejo 2>$null | Out-Null
podman volume rm -f renovate-forgejo-data 2>$null | Out-Null
Remove-Item (Join-Path $PSScriptRoot '.forgejo-token') -ErrorAction SilentlyContinue
Write-Host 'Forgejo inkl. Daten entfernt' -ForegroundColor Cyan
Write-Host 'Forgejo removed including all data' -ForegroundColor Cyan
} else {
Write-Host 'Forgejo gestoppt (Daten bleiben erhalten; -Purge zum Löschen)' -ForegroundColor Cyan
Write-Host 'Forgejo stopped (data is kept; use -Purge to delete it)' -ForegroundColor Cyan
}
+1 -1
View File
@@ -1,3 +1,3 @@
# Setzt das lokale Forgejo komplett zurück: alles löschen (inkl. Repo, PRs, Token) und frisch starten.
# Resets the local Forgejo completely: delete everything (including repos, PRs, tokens) and start fresh.
& (Join-Path $PSScriptRoot 'forgejo-down.ps1') -Purge
& (Join-Path $PSScriptRoot 'forgejo-up.ps1')
+11 -11
View File
@@ -1,12 +1,12 @@
# Startet ein lokales Forgejo (Git-Server) in Podman, legt den Bot-User "renovate" an
# und speichert ein frisches Access-Token in .forgejo-token (wird von renovate-update.ps1 gelesen).
# Starts a local Forgejo (Git server) in Podman, creates the bot user "renovate"
# and stores a fresh access token in .forgejo-token (read by renovate-update.ps1).
$ts = Get-Date -Format 'yyyy-MM-dd-HH-mm-ss-fff'
$tokenFile = Join-Path $PSScriptRoot '.forgejo-token'
$username = 'renovate'
$password = 'renovate'
# 1. Container starten – beim ersten Mal anlegen.
# ENABLE_PUSH_CREATE_USER: ein Repo wird beim ersten "git push" automatisch angelegt.
# 1. Start the container - create it on first run.
# ENABLE_PUSH_CREATE_USER: a repository is created automatically on the first "git push".
podman start renovate-forgejo 2>$null | Out-Null
if ($LASTEXITCODE -ne 0) {
podman run -d --name renovate-forgejo -p 3000:3000 -v renovate-forgejo-data:/data `
@@ -14,22 +14,22 @@ if ($LASTEXITCODE -ne 0) {
-e FORGEJO__repository__ENABLE_PUSH_CREATE_USER=true `
-e FORGEJO__repository__DEFAULT_BRANCH=main `
codeberg.org/forgejo/forgejo:11 | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Forgejo-Container konnte nicht gestartet werden' }
if ($LASTEXITCODE -ne 0) { throw 'Could not start the Forgejo container' }
}
Write-Host 'Warte auf Forgejo ...'
Write-Host 'Waiting for Forgejo ...'
do {
Start-Sleep -Seconds 1
try { $ready = (Invoke-WebRequest 'http://localhost:3000/api/healthz' -UseBasicParsing).StatusCode -eq 200 } catch { $ready = $false }
} until ($ready)
# 2. Bot-User anlegen (Fehler ignorieren, falls er schon existiert) und ein frisches Access-Token erzeugen
# 2. Create the bot user (ignore the error if it already exists) and generate a fresh access token
podman exec -u git renovate-forgejo forgejo admin user create --admin --username $username `
--password $password --email renovate@localhost --must-change-password=false 2>$null | Out-Null
$token = podman exec -u git renovate-forgejo forgejo admin user generate-access-token `
--username $username --token-name "renovate-$ts" --scopes all --raw
Set-Content -Path $tokenFile -Value $token -NoNewline
Write-Host "`nForgejo läuft: http://localhost:3000" -ForegroundColor Cyan
Write-Host " Benutzer: $username"
Write-Host " Passwort: $password"
Write-Host " Token gespeichert in $tokenFile"
Write-Host "`nForgejo is running: http://localhost:3000" -ForegroundColor Cyan
Write-Host " Username: $username"
Write-Host " Password: $password"
Write-Host " Token saved to $tokenFile"
+6 -6
View File
@@ -1,14 +1,14 @@
# Nur prüfen: Renovate läuft mit der "local"-Plattform direkt auf diesem Verzeichnis
# und ändert nichts. Gefundene Updates werden aus dem JSON-Report gelesen und ausgegeben.
# Renovate braucht Node.js >= 24.11
if ([version](node -v).TrimStart('v') -lt [version]'24.11.0') { throw "Renovate braucht Node.js >= 24.11, gefunden: $(node -v). Z. B.: volta install node@24" }
# Check only: Renovate runs with the "local" platform directly on this directory
# and changes nothing. Found updates are read from the JSON report and printed.
# Renovate requires Node.js >= 24.11
if ([version](node -v).TrimStart('v') -lt [version]'24.11.0') { throw "Renovate requires Node.js >= 24.11, found: $(node -v). E.g.: volta install node@24" }
$report = Join-Path ([IO.Path]::GetTempPath()) 'renovate-report.json'
Push-Location (Join-Path $PSScriptRoot '..') # Repo-Root
Push-Location (Join-Path $PSScriptRoot '..') # repository root
npx --yes renovate@44.149.3 --platform=local --dry-run=lookup --report-type=file --report-path=$report
Pop-Location
Write-Host "`nGefundene Updates:" -ForegroundColor Cyan
Write-Host "`nAvailable updates:" -ForegroundColor Cyan
$packageFiles = (Get-Content $report -Raw -Encoding UTF8 | ConvertFrom-Json).repositories.local.packageFiles
foreach ($manager in $packageFiles.PSObject.Properties) {
foreach ($file in $manager.Value) {
+19 -19
View File
@@ -1,30 +1,30 @@
# Renovate-Lauf gegen ein Forgejo (lokal per script\forgejo-up.ps1 gestartet).
# Jeder Lauf erzeugt einen neuen Branch + PR mit Zeitstempel: renovate/<yyyy-MM-dd-HH-mm-ss-fff>-all
# Renovate run against a Forgejo (started locally via script\forgejo-up.ps1).
# Every run creates new branches + PRs with a timestamp: renovate/<yyyy-MM-dd-HH-mm-ss-fff>-<group>
$endpoint = 'http://localhost:3000'
$repo = 'renovate/renovate-test'
$tokenFile = Join-Path $PSScriptRoot '.forgejo-token'
# Renovate braucht Node.js >= 24.11
if ([version](node -v).TrimStart('v') -lt [version]'24.11.0') { throw "Renovate braucht Node.js >= 24.11, gefunden: $(node -v). Z. B.: volta install node@24" }
# Forgejo muss laufen und ein Token muss vorhanden sein
try { Invoke-WebRequest "$endpoint/api/healthz" -UseBasicParsing | Out-Null } catch { throw "Forgejo unter $endpoint nicht erreichbar – zuerst .\script\forgejo-up.ps1 ausführen" }
if (-not (Test-Path $tokenFile)) { throw "$tokenFile fehlt – zuerst .\script\forgejo-up.ps1 ausführen" }
# Renovate requires Node.js >= 24.11
if ([version](node -v).TrimStart('v') -lt [version]'24.11.0') { throw "Renovate requires Node.js >= 24.11, found: $(node -v). E.g.: volta install node@24" }
# Forgejo must be running and a token must exist
try { Invoke-WebRequest "$endpoint/api/healthz" -UseBasicParsing | Out-Null } catch { throw "Forgejo is not reachable at $endpoint - run .\script\forgejo-up.ps1 first" }
if (-not (Test-Path $tokenFile)) { throw "$tokenFile is missing - run .\script\forgejo-up.ps1 first" }
$token = (Get-Content $tokenFile -Raw).Trim()
$now = Get-Date
$ts = $now.ToString('yyyy-MM-dd-HH-mm-ss-fff') # für den Branch-Namen (keine ':' oder Leerzeichen erlaubt)
$prTimestamp = $now.ToString('yyyy-MM-dd HH:mm:ss.fff') # für den PR-Titel
$ts = $now.ToString('yyyy-MM-dd-HH-mm-ss-fff') # for the branch name (no ':' or spaces allowed)
$prTimestamp = $now.ToString('yyyy-MM-dd HH:mm:ss.fff') # for the PR title
$gitUrl = $endpoint -replace '://', "://renovate:$token@"
$gitUrl = "$gitUrl/$repo.git"
Push-Location (Join-Path $PSScriptRoot '..') # Repo-Root
Push-Location (Join-Path $PSScriptRoot '..') # repository root
# 1. Lokalen Stand von main nach Forgejo pushen (ohne Credential-Helper, die Zugangsdaten stehen in der URL)
# 1. Push the local state of main to Forgejo (without credential helper, the credentials are in the URL)
git -c credential.helper= push $gitUrl main:main
if ($LASTEXITCODE -ne 0) { Pop-Location; throw 'git push fehlgeschlagen' }
if ($LASTEXITCODE -ne 0) { Pop-Location; throw 'git push failed' }
# 2. Renovate laufen lassen. Branch-Präfix mit Zeitstempel => jeder Lauf erzeugt einen neuen Branch + PR.
# branch-prefix-old verhindert, dass Renovate Branches früherer Läufe wiederverwendet.
# Per Env-Variable: der Commit-Autor und der Zeitstempel im PR-Titel (commitMessageSuffix gibt es nicht als CLI-Flag).
# 2. Run Renovate. Branch prefix with timestamp => every run creates new branches + PRs.
# branch-prefix-old prevents Renovate from reusing branches of previous runs.
# Via environment variables: the commit author and the timestamp in the PR title (commitMessageSuffix has no CLI flag).
$env:RENOVATE_GIT_AUTHOR = 'Renovate Bot <renovate@localhost>'
$env:RENOVATE_COMMIT_MESSAGE_SUFFIX = $prTimestamp
npx --yes renovate@44.149.3 `
@@ -33,11 +33,11 @@ npx --yes renovate@44.149.3 `
$repo
$renovateExitCode = $LASTEXITCODE
Remove-Item Env:RENOVATE_GIT_AUTHOR, Env:RENOVATE_COMMIT_MESSAGE_SUFFIX
if ($renovateExitCode -ne 0) { Pop-Location; throw 'Renovate fehlgeschlagen' }
if ($renovateExitCode -ne 0) { Pop-Location; throw 'Renovate failed' }
# 3. Renovate-Branches ins lokale Repo holen (als forgejo/renovate/...)
# 3. Fetch the Renovate branches into the local repository (as forgejo/renovate/...)
git -c credential.helper= fetch -q --prune $gitUrl '+refs/heads/renovate/*:refs/remotes/forgejo/renovate/*'
Write-Host "`nNeuer Branch:" -ForegroundColor Cyan
Write-Host "`nNew branches:" -ForegroundColor Cyan
git branch -r --list "forgejo/renovate/$ts-*"
Write-Host "PRs: $endpoint/$repo/pulls (Login: renovate / renovate)"
Write-Host "PRs: $endpoint/$repo/pulls (login: renovate / renovate)"
Pop-Location