@@ -259,6 +259,7 @@ if [ -f "$FUNCTION_SQL_FILE" ]; then
259
259
" Comparison"
260
260
" Conditional"
261
261
" Distance"
262
+ " Dates and Times"
262
263
)
263
264
264
265
for CATEGORY in " ${FUNCTION_CATEGORIES[@]} " ; do
@@ -271,15 +272,17 @@ if [ -f "$FUNCTION_SQL_FILE" ]; then
271
272
}
272
273
273
274
# Rename the temporary output file to the correct name
274
- CATEGORY_LOWER=$( echo " $CATEGORY " | tr ' [:upper:]' ' [:lower:]' )
275
+ # Category can be "Dates and Times" for example, resulting in `dates and times-functions.md` so we change spaces to underscores
276
+ CATEGORY_LOWER=$( echo " $CATEGORY " | tr ' [:upper:]' ' [:lower:]' | tr ' ' ' _' )
275
277
if [ -f " temp-functions.md" ]; then
278
+ echo " ${CATEGORY_LOWER} -functions.md"
276
279
mv " temp-functions.md" " ${CATEGORY_LOWER} -functions.md" || {
277
280
echo " [$SCRIPT_NAME ] Error: Failed to rename temp-functions.md to ${CATEGORY_LOWER} -functions.md"
278
281
exit 1
279
282
}
280
283
echo " [$SCRIPT_NAME ] Generated ${CATEGORY_LOWER} -functions.md"
281
284
else
282
- echo " [$SCRIPT_NAME ] Warning: temp-functions.md not found after processing $CATEGORY functions "
285
+ echo " [$SCRIPT_NAME ] Warning: temp-functions.md not found for $CATEGORY "
283
286
fi
284
287
done
285
288
else
@@ -360,7 +363,9 @@ insert_src_files=(
360
363
" comparison-functions.md"
361
364
" conditional-functions.md"
362
365
" distance-functions.md"
366
+ " dates_and_times-functions.md"
363
367
)
368
+
364
369
insert_dest_files=(
365
370
" docs/about-us/beta-and-experimental-features.md"
366
371
" docs/sql-reference/functions/arithmetic-functions.md"
@@ -370,8 +375,10 @@ insert_dest_files=(
370
375
" docs/sql-reference/functions/comparison-functions.md"
371
376
" docs/sql-reference/functions/conditional-functions.md"
372
377
" docs/sql-reference/functions/distance-functions.md"
378
+ " docs/sql-reference/functions/date-time-functions.md"
373
379
)
374
- echo " [$SCRIPT_NAME ] Inserting generated markdown content between <!-- AUTOGENERATED_START --> <!-- AUTOGENERATED_END --> tags"
380
+
381
+ echo " [$SCRIPT_NAME ] Inserting generated markdown content between AUTOGENERATED_START and AUTOGENERATED_END tags"
375
382
for i in " ${! insert_src_files[@]} " ; do
376
383
src_file=" ${insert_src_files[i]} "
377
384
@@ -405,7 +412,7 @@ for i in "${!insert_src_files[@]}"; do
405
412
# Replace the original file with the modified content
406
413
mv " $tmp_file " " $dest_full_path "
407
414
else
408
- echo " [$SCRIPT_NAME ] Error: Expected to find <!-- AUTOGENERATED_START--> and <!-- AUTOGENERATED_END--> tags in $dest_full_path , but did not"
415
+ echo " [$SCRIPT_NAME ] Error: Expected to find AUTOGENERATED_START and AUTOGENERATED_END tags in $dest_full_path , but did not"
409
416
exit 1
410
417
fi
411
418
@@ -424,7 +431,7 @@ cd "$parent_of_tmp" || echo "[$SCRIPT_NAME] Warning: Failed to cd back to parent
424
431
echo " [$SCRIPT_NAME ] Removing contents of temporary directory: $tmp_dir "
425
432
# Use full path for removal just in case cd failed
426
433
rm -rf " $tmp_dir " /*
427
- rmdir " $tmp_dir " 2> /dev/null || echo " [$SCRIPT_NAME ] Info: Did not remove $tmp_dir (might contain hidden files or already gone). "
434
+ rmdir " $tmp_dir " 2> /dev/null || echo " [$SCRIPT_NAME ] Unable to remove $tmp_dir "
428
435
429
436
echo " [$SCRIPT_NAME ] Auto-generation of settings markdown pages completed successfully."
430
437
exit 0
0 commit comments