Hilfsskripte in PowerShell statt Node.js
This commit is contained in:
1 parent
c8014d6f5e
commit
302faa395c
12 files changed
+311
-288
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# Nur prüfen: Renovate läuft mit --platform=local direkt auf diesem Verzeichnis.
|
||||
# Es werden keine Dateien geändert; das Ergebnis (gefundene Updates) landet im Log
|
||||
# und als JSON-Report in .renovate-local\report.json.
|
||||
. "$PSScriptRoot\lib.ps1"
|
||||
|
||||
Invoke-Main {
|
||||
New-Item -ItemType Directory -Force -Path $StateDir | Out-Null
|
||||
$reportPath = Join-Path $StateDir 'report.json'
|
||||
$logLevel = Get-EnvOrDefault 'LOG_LEVEL' 'info'
|
||||
|
||||
Write-Step "Renovate $RenovateVersion – Dry-Run (lookup) auf $RootDir"
|
||||
Invoke-Renovate @('--platform=local', '--dry-run=lookup', '--report-type=file', "--report-path=$reportPath") @{ LOG_LEVEL = $logLevel }
|
||||
|
||||
Write-Step 'Gefundene Updates:'
|
||||
$report = [IO.File]::ReadAllText($reportPath) | ConvertFrom-Json
|
||||
foreach ($repo in $report.repositories.PSObject.Properties.Value) {
|
||||
foreach ($manager in $repo.packageFiles.PSObject.Properties) {
|
||||
foreach ($file in $manager.Value) {
|
||||
foreach ($dep in $file.deps) {
|
||||
if (-not ($dep.PSObject.Properties.Name -contains 'updates')) { continue }
|
||||
foreach ($update in $dep.updates) {
|
||||
Write-Host " [$($manager.Name)] $($file.packageFile): $($dep.depName) $($dep.currentValue) -> $($update.newValue) ($($update.updateType))"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user