3
0

Tweak adoc templates

- Updates path for generated docs
- Adds adoc codegen for expression and fixes expr_types.gen.adoc.tpl
This commit is contained in:
Vivek Patel
2021-05-07 18:24:59 +05:30
committed by Denis Arh
parent da02e9d9b1
commit 0bfa57acd2
7 changed files with 137 additions and 4 deletions
+8 -2
View File
@@ -14,7 +14,7 @@ import (
func Proc() {
const (
docGenBase = "/partials/generated"
docGenBase = "/generated/partials"
)
var (
@@ -129,7 +129,7 @@ func Proc() {
}()
if len(docPath) > 0 {
docPath = strings.TrimRight(docPath, "/") + "/src/modules/ROOT"
docPath = strings.TrimRight(docPath, "/") + "/src/modules"
if i, err := os.Stat(docPath); err != nil {
handleError(err)
} else if !i.IsDir() {
@@ -212,6 +212,9 @@ func Proc() {
if genCode {
err = genExprTypes(tpls, exprTypeDefs...)
}
if genDocs && err == nil {
err = genExprTypeDocs(tpls, docPath+docGenBase, exprTypeDefs...)
}
}
if outputErr(err, "failed to process expr types:\n") {
@@ -282,6 +285,9 @@ func Proc() {
err = genAutomationFunctions(tpls, aFuncsDefs...)
}
if genDocs && err == nil {
err = genAutomationFunctionDocs(tpls, docPath+docGenBase, aFuncsDefs...)
}
}
if outputErr(err, "failed to process automation functions:\n") {