Files
cozsweet-frontend-nextjs/scripts/release/pre_release_web.sh
T
admin e2abe03a33 chore: reorganize icons for environment-specific deployment
Move environment-specific icons into dedicated directories (icons/develop, icons/test, icons/production) and update release scripts to copy the appropriate icon set (favicon.ico, Icon-192.png, Icon-512.png) into public/ for each target environment. Update manifest.json to reference the new /images/icons/ path.
2026-06-12 14:33:37 +08:00

34 lines
1.1 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
# ==========================================
# 预发布脚本(Next.js
# 合并 dev 分支代码到 test worktree,并发布 Web 制品(测试环境)
# 原始 Dart: scripts/release/pre_release_web.sh
#
# 改动:
# - WORKTREE_PATH 改为 Next.js 项目对应 worktree
# - 图标复制路径适配 Next.jsicons/test/icons/Icon-*.png
# ==========================================
# Test 分支 worktree 路径
WORKTREE_PATH="/Users/chase/Documents/cozsweet-frontend-nextjs.worktrees/cozsweet-test"
echo "=== 进入 test 分支 worktree ==="
cd "$WORKTREE_PATH"
echo "=== 检查当前分支 ==="
git branch --show-current
echo "=== 合并 dev 分支 ==="
git merge dev
# 复制测试环境图标(source: icons/test → dest: public/
echo "=== 复制测试环境图标(icons/test → public/ ==="
cp -f icons/test/favicon.ico public/favicon.ico
cp -f icons/test/icons/Icon-192.png public/images/icons/Icon-192.png
cp -f icons/test/icons/Icon-512.png public/images/icons/Icon-512.png
echo "=== 执行构建部署脚本(测试环境)==="
./scripts/deploy/deploy_web_test.sh
echo "=== 预发布完成 ==="