fix: исправить копирование статических файлов в manage.sh (update)

- Добавлено удаление старых файлов перед копированием новых
- public и .next/static теперь копируются корректно при обновлении

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
kilyabin
2026-03-05 14:10:30 +04:00
parent fa7fd147f5
commit 39cdf692ce

View File

@@ -198,11 +198,13 @@ case "$1" in
# Copy public directory to standalone (always update) # Copy public directory to standalone (always update)
if [ -d "$INSTALL_DIR/public" ]; then if [ -d "$INSTALL_DIR/public" ]; then
echo -e "${YELLOW}Copying public directory to standalone...${NC}" echo -e "${YELLOW}Copying public directory to standalone...${NC}"
rm -rf "$INSTALL_DIR/.next/standalone/public" 2>/dev/null || true
cp -r "$INSTALL_DIR/public" "$INSTALL_DIR/.next/standalone/public" 2>/dev/null || true cp -r "$INSTALL_DIR/public" "$INSTALL_DIR/.next/standalone/public" 2>/dev/null || true
fi fi
# Copy .next/static to standalone/.next/static (always update) # Copy .next/static to standalone/.next/static (always update)
if [ -d "$INSTALL_DIR/.next/static" ]; then if [ -d "$INSTALL_DIR/.next/static" ]; then
echo -e "${YELLOW}Copying .next/static to standalone...${NC}" echo -e "${YELLOW}Copying .next/static to standalone...${NC}"
rm -rf "$INSTALL_DIR/.next/standalone/.next/static" 2>/dev/null || true
mkdir -p "$INSTALL_DIR/.next/standalone/.next" mkdir -p "$INSTALL_DIR/.next/standalone/.next"
cp -r "$INSTALL_DIR/.next/static" "$INSTALL_DIR/.next/standalone/.next/static" 2>/dev/null || true cp -r "$INSTALL_DIR/.next/static" "$INSTALL_DIR/.next/standalone/.next/static" 2>/dev/null || true
else else