Initial commit
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const ROOT = path.join(__dirname, "..");
|
||||
const legacyRoot = path.join(ROOT, "assets");
|
||||
const mediaRoot = path.join(ROOT, ".media-source");
|
||||
|
||||
const directories = [
|
||||
"original-content",
|
||||
"original-slider",
|
||||
"original-secondary-slider",
|
||||
"original-herosections",
|
||||
];
|
||||
|
||||
fs.mkdirSync(mediaRoot, { recursive: true });
|
||||
|
||||
for (const directory of directories) {
|
||||
const legacyDir = path.join(legacyRoot, directory);
|
||||
const targetDir = path.join(mediaRoot, directory);
|
||||
|
||||
if (!fs.existsSync(legacyDir)) {
|
||||
console.log(`[media:migrate] ${directory} bereits ausgelagert oder nicht vorhanden.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fs.existsSync(targetDir)) {
|
||||
console.log(`[media:migrate] ${directory} bereits unter .media-source vorhanden, überspringe.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
fs.renameSync(legacyDir, targetDir);
|
||||
console.log(`[media:migrate] ${directory} → .media-source/${directory}`);
|
||||
}
|
||||
Reference in New Issue
Block a user