From 302fef1f8541a2c4dbd2c94fcfb8ff62f1544dee Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 25 Jun 2025 18:18:23 +0200 Subject: [PATCH 1/2] Added some more logging to debug build failures Signed-off-by: Ole Herman Schumacher Elgesem --- generator/_regenerate_json.sh | 1 + generator/_scripts/cfdoc_macros.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/generator/_regenerate_json.sh b/generator/_regenerate_json.sh index df4724ae6..bc4ba4201 100755 --- a/generator/_regenerate_json.sh +++ b/generator/_regenerate_json.sh @@ -97,6 +97,7 @@ done ) | while read agent do dumpHelp ${agent} > ${OUTDIR}/${agent}.help + echo "Dumped help output for ${agent} to ${OUTDIR}/${agent}.help" done # Here we execute and store some command output so that examples can always be up to date. diff --git a/generator/_scripts/cfdoc_macros.py b/generator/_scripts/cfdoc_macros.py index 432690b5a..57914307c 100644 --- a/generator/_scripts/cfdoc_macros.py +++ b/generator/_scripts/cfdoc_macros.py @@ -757,6 +757,10 @@ def include_snippet(parameters, config): markdown_lines.append(line) if not len(markdown_lines): + print("Did not find expected content in %s" % filename) + print("Full content of file:") + for line in lines: + print(line, end="") raise Exception("Snippet not found: %s" % begin.pattern) return list() From 7eda86e2260b38c68aa49a286136447d003cc96a Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Wed, 25 Jun 2025 19:24:24 +0200 Subject: [PATCH 2/2] Fixed mistake in include_snippet macro This error was introduced by me a month ago when I ran Prettier on our markdowns. Prettier doesn't recognize our custom macros and so tries to parse them as just markdown and makes small improvements to them. A few things we should do: - Stop rendering markdown cheatsheet, it's not needed. - Switch to using Hugo macros instead of our custom system. Signed-off-by: Ole Herman Schumacher Elgesem --- cheatsheet.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheet.markdown b/cheatsheet.markdown index 7eab1cae7..f212883cd 100644 --- a/cheatsheet.markdown +++ b/cheatsheet.markdown @@ -511,7 +511,7 @@ Sometimes it's nice to include a snippet from another file. For example, we dyna `[%CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$)%]` -[%CFEngine_include_snippet(cf-promises.help, [\s]\*--[a-z], ^$)%] +[%CFEngine_include_snippet(cf-promises.help, [\s]*--[a-z], ^$)%] ---