Update template to render directly to docs includes directory

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2022-03-11 11:06:47 +01:00
parent a9d713d267
commit 351733c110
17 changed files with 58 additions and 7 deletions
+13 -7
View File
@@ -34,14 +34,20 @@ func main() {
{{- end}}
}
for pkg, yml := range cfg {
targetFolder := filepath.Join("../../", pkg, "/config")
os.MkdirAll(targetFolder, 0700)
targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml"))
if err != nil {
log.Fatalf("Failed to create target file for : %s", err)
targetFolders := []string{
// TODO: comment in when it is clear how to commit this to the structure of the master|main branch
// filepath.Join("../../", pkg, "/config"),
"../../docs/extensions/_includes/",
}
for _, targetFolder := range targetFolders {
os.MkdirAll(targetFolder, 0700)
targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml"))
if err != nil {
log.Fatalf("Failed to create target file for : %s", err)
}
defer targetYamlFile.Close()
targetYamlFile.WriteString(yml)
}
defer targetYamlFile.Close()
targetYamlFile.WriteString(yml)
}
}