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:
Generated
+8
-2
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user