Files
cozsweet-frontend-nextjs/scripts/release/release_web.sh
T
admin 4c9fd23b4f chore(release): update worktree paths to match new directory structure
Update WORKTREE_PATH in pre_release_web.sh and release_web.sh to reference the new frontend subdirectory location, aligning scripts with the current project folder structure.
2026-06-12 16:01:09 +08:00

29 lines
1.2 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Main 分支 worktree 路径
WORKTREE_PATH="/Users/chase/Documents/frontend/cozsweet-frontend-nextjs.worktrees/cozsweet-nextjs-main"
echo "=== 进入 main 分支 worktree ==="
cd "$WORKTREE_PATH" || { echo "错误: 无法进入 $WORKTREE_PATH"; exit 1; }
echo "=== 检查当前分支 ==="
git branch --show-current
echo "=== 合并 dev 分支 ==="
git merge dev
# 复制生产环境图标(source: $WORKTREE_PATH/icons/production → dest: $WORKTREE_PATH/public/
echo "=== 复制生产环境图标(icons/production → public/ ==="
cp -f "$WORKTREE_PATH/icons/production/favicon.ico" "$WORKTREE_PATH/public/favicon.ico"
cp -f "$WORKTREE_PATH/icons/production/icons/Icon-192.png" "$WORKTREE_PATH/public/images/icons/Icon-192.png"
cp -f "$WORKTREE_PATH/icons/production/icons/Icon-512.png" "$WORKTREE_PATH/public/images/icons/Icon-512.png"
# 准备生产环境变量($WORKTREE_PATH/env-example/.env.production.example → $WORKTREE_PATH/.env.local
echo "=== 准备生产环境变量(env-example/.env.production.example → .env.local ==="
cp -f "$WORKTREE_PATH/env-example/.env.production.example" "$WORKTREE_PATH/.env.local"
echo "=== 执行构建部署脚本 ==="
./scripts/deploy/deploy_web.sh
echo "=== 发布完成 ==="