@@ -12,7 +12,7 @@ NC='\033[0m' # No Color
12
12
SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
13
13
PROJECT_ROOT=" ${PROJECT_ROOT:- $(cd " $SCRIPT_DIR /../../../" && pwd)} "
14
14
CARGO_TARGET_DIR=" ${CARGO_TARGET_DIR:- $PROJECT_ROOT / target} "
15
- OUTPUT_DIR =" ${OUTPUT_DIR :- $CARGO_TARGET_DIR / generated-docs} "
15
+ OUTPUT_FILE =" ${OUTPUT_FILE :- $CARGO_TARGET_DIR / generated-docs/ node-parameters.md } "
16
16
TEMP_DIR=" ${TEMP_DIR:- $CARGO_TARGET_DIR / doc-generation} "
17
17
18
18
# Binary paths - allow override via environment
@@ -52,11 +52,17 @@ main() {
52
52
log_info " Starting config documentation generation..."
53
53
54
54
# Create necessary directories
55
- mkdir -p " $OUTPUT_DIR "
55
+ mkdir -p " $( dirname " $OUTPUT_FILE " ) "
56
56
mkdir -p " $TEMP_DIR "
57
57
58
58
cd " $PROJECT_ROOT "
59
59
60
+ # Workaround for new nightly lint that breaks stacks-common build.
61
+ # Allow callers to override or extend, but default to allowing the lint so documentation generation
62
+ # stays green until codebase is updated.
63
+ # TODO: Remove this once codebase will be updated to use the new lifetime syntax.
64
+ export RUSTFLAGS=" ${RUSTFLAGS:- } -A mismatched-lifetime-syntaxes"
65
+
60
66
# Step 1: Build the documentation generation tools
61
67
if [[ " $SKIP_BUILD " != " true" ]]; then
62
68
log_info " Building documentation generation tools..."
@@ -81,22 +87,21 @@ main() {
81
87
82
88
# Step 3: Generate Markdown
83
89
log_info " Generating Markdown documentation..."
84
- MARKDOWN_OUTPUT=" $OUTPUT_DIR /configuration-reference.md"
85
90
86
91
# Call the command
87
- " $GENERATE_MARKDOWN_BIN " --input " $EXTRACTED_JSON " --output " $MARKDOWN_OUTPUT " --template " $TEMPLATE_PATH " --section-name-mappings " $SECTION_MAPPINGS_PATH "
92
+ " $GENERATE_MARKDOWN_BIN " --input " $EXTRACTED_JSON " --output " $OUTPUT_FILE " --template " $TEMPLATE_PATH " --section-name-mappings " $SECTION_MAPPINGS_PATH "
88
93
89
94
log_info " Documentation generation complete!"
90
95
log_info " Generated files:"
91
- log_info " - Configuration reference: $MARKDOWN_OUTPUT "
96
+ log_info " - Configuration reference: $OUTPUT_FILE "
92
97
log_info " - Intermediate JSON: $EXTRACTED_JSON "
93
98
94
99
# Verify output
95
- if [[ -f " $MARKDOWN_OUTPUT " ]]; then
96
- WORD_COUNT=$( wc -w < " $MARKDOWN_OUTPUT " )
100
+ if [[ -f " $OUTPUT_FILE " ]]; then
101
+ WORD_COUNT=$( wc -w < " $OUTPUT_FILE " )
97
102
log_info " Generated Markdown contains $WORD_COUNT words"
98
103
else
99
- log_error " Expected output file not found: $MARKDOWN_OUTPUT "
104
+ log_error " Expected output file not found: $OUTPUT_FILE "
100
105
exit 1
101
106
fi
102
107
}
@@ -125,7 +130,7 @@ DESCRIPTION:
125
130
Source file: stackslib/src/config/mod.rs
126
131
127
132
OUTPUT:
128
- docs/generated/configuration-reference .md
133
+ docs/generated/node-parameters .md
129
134
130
135
EOF
131
136
}
0 commit comments