build.sh: recreate pruned parent dirs before the content overlay (checkout of the content-free tree removes empty src/content)

This commit is contained in:
2026-09-03 19:50:43 +02:00
parent 751fd0ec79
commit 6ed5d5859a
+3 -1
View File
@@ -91,8 +91,10 @@ podman run --rm --network="$BUILD_NETNS" --memory=1g \
}
sync_clone repo "$CODE_URL" "$CODE_SHA"
sync_clone content "$CONTENT_URL" "$CONTENT_SHA"
# Overlay content onto code (these paths are gitignored in the code repo)
# Overlay content onto code (these paths are gitignored in the code repo).
# mkdir -p: checkout prunes the emptied parent dirs, cp needs them back.
rm -rf repo/src/content/news repo/src/content/pages repo/public/uploads
mkdir -p repo/src/content repo/public
cp -a content/news repo/src/content/news
cp -a content/pages repo/src/content/pages
cp -a content/uploads repo/public/uploads