This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch HDDS-9225-website-v2
in repository https://gitbox.apache.org/repos/asf/ozone-site.git


The following commit(s) were added to refs/heads/HDDS-9225-website-v2 by this 
push:
     new c17cd1f0 HDDS-10506. Reduce directory iterations in sidebar check (#85)
c17cd1f0 is described below

commit c17cd1f0e17e5337cdd295cfc38d0b4705de9d2b
Author: Ethan Rose <[email protected]>
AuthorDate: Thu Mar 21 22:46:01 2024 -0700

    HDDS-10506. Reduce directory iterations in sidebar check (#85)
---
 .github/scripts/sidebar.sh | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/.github/scripts/sidebar.sh b/.github/scripts/sidebar.sh
index 6b270946..330ccc5b 100755
--- a/.github/scripts/sidebar.sh
+++ b/.github/scripts/sidebar.sh
@@ -27,13 +27,11 @@ root="$(git rev-parse --show-toplevel)"
 schema="$root"/.github/resource/category.schema.json
 
 # Make sure all docs directories have a category sidebar file.
-for child in $(find "$root"/docs/*); do
-    if [ -d "$child" ]; then
-        category_file="$child/_category_.yml"
-        if [ ! -f "$category_file" ]; then
-            echo "_category_.yml is required for docs subdirectory $child" 1>&2
-            rc=1
-        fi
+for child in $(find "$root"/docs/* -type d); do
+    category_file="$child/_category_.yml"
+    if [ ! -f "$category_file" ]; then
+        echo "_category_.yml is required for docs subdirectory $child" 1>&2
+        rc=1
     fi
 done
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to