Skip to content

Commit 1d3e27f

Browse files
committed
fix build sh
1 parent 59fa856 commit 1d3e27f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

website/build_versioned_docs.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ sidebar_json='{
8989
]
9090
}'
9191

92+
# handle OS-specific cp command
93+
if [ "$(uname)" == "Darwin" ]; then
94+
CP_CMD="cp -R website/docs/ "
95+
else
96+
CP_CMD="cp -r website/docs/* "
97+
fi
98+
9299
# Iterate over each matched branch
93100
for branch in $branches; do
94101
# Remove the remote branch prefix "remotes/origin/"
@@ -111,7 +118,7 @@ for branch in $branches; do
111118
mkdir -p "$version_dir"
112119

113120
# Copy the website/docs directory to the target directory
114-
cp -r "website/docs/" "$version_dir/" || { echo "Failed to copy for branch: $clean_branch_name"; continue; }
121+
$CP_CMD "$version_dir/" || { echo "Failed to copy for branch: $clean_branch_name"; continue; }
115122
echo "Copied documentation for branch '$clean_branch_name' to '$version_dir'"
116123
else
117124
echo "The website/docs directory does not exist in branch '$clean_branch_name', skipping..."

0 commit comments

Comments
 (0)