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

+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