Skripte plattformunabhängig in Node.js statt Bash
This commit is contained in:
1 parent
7e64f85836
commit
712acdf2e5
12 files changed
+273
-172
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.
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { ROOT_DIR, STATE_DIR, RENOVATE_VERSION, log, renovateCli, main } from "./lib.mjs";
|
||||
|
||||
main(async () => {
|
||||
fs.mkdirSync(STATE_DIR, { recursive: true });
|
||||
const reportPath = path.join(STATE_DIR, "report.json");
|
||||
|
||||
log(`Renovate ${RENOVATE_VERSION} – Dry-Run (lookup) auf ${ROOT_DIR}`);
|
||||
renovateCli(
|
||||
["--platform=local", "--dry-run=lookup", "--report-type=file", `--report-path=${reportPath}`],
|
||||
{ LOG_LEVEL: process.env.LOG_LEVEL ?? "info" },
|
||||
);
|
||||
|
||||
log("Gefundene Updates:");
|
||||
const report = JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
||||
for (const repo of Object.values(report.repositories)) {
|
||||
for (const [manager, files] of Object.entries(repo.packageFiles)) {
|
||||
for (const f of files)
|
||||
for (const d of f.deps)
|
||||
for (const u of d.updates ?? [])
|
||||
console.log(` [${manager}] ${f.packageFile}: ${d.depName} ${d.currentValue} -> ${u.newValue} (${u.updateType})`);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user