mirror of
https://github.com/Dokploy/templates.git
synced 2026-06-15 20:25:24 +02:00
refactor: convert template.yml files to template.toml format
- Updated the script to convert 'template.yml' files to 'template.toml' files during directory processing. - Added new 'template.toml' files for Backrest and BlinkO blueprints with appropriate configuration settings.
This commit is contained in:
@@ -22,11 +22,15 @@ function processDirectory(dirPath) {
|
||||
if (stat.isDirectory()) {
|
||||
processDirectory(filePath);
|
||||
} else if (file === "template.yml") {
|
||||
console.log(`Deleting ${filePath}`);
|
||||
fs.unlinkSync(filePath);
|
||||
console.log(`Converting ${filePath}`);
|
||||
const yamlContent = fs.readFileSync(filePath, "utf8");
|
||||
const tomlContent = convertYamlToToml(yamlContent);
|
||||
const tomlPath = path.join(dirPath, "template.toml");
|
||||
fs.writeFileSync(tomlPath, tomlContent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Ruta al directorio blueprints relativa al script
|
||||
const blueprintsPath = path.join(__dirname, "..", "blueprints");
|
||||
processDirectory(blueprintsPath);
|
||||
|
||||
Reference in New Issue
Block a user