chore: 新版构建部署流程

This commit is contained in:
lzh
2025-12-23 14:13:20 +08:00
parent e508bd692d
commit e52ffe7375
2 changed files with 12 additions and 8 deletions

View File

@@ -49,11 +49,12 @@ Write-Host "Build size: $buildSizeRounded MB" -ForegroundColor Cyan
$response = Read-Host "Do you want to commit and push to repository? (y/n)"
if ($response -eq "y" -or $response -eq "Y") {
$gitStatus = git status --porcelain
if ($gitStatus) {
# 只检查 dist 目录的变化,不检查其他文件
$distStatus = git status --porcelain apps/web-antd/dist
if ($distStatus) {
Write-Host "Staging build artifacts..." -ForegroundColor Yellow
# 只添加 dist 目录,不添加其他文件
git add -f apps/web-antd/dist
git add -A
Write-Host "Committing changes..." -ForegroundColor Yellow
# 使用 --no-verify 跳过 pre-commit hooks避免检查大量构建产物文件
@@ -66,7 +67,8 @@ if ($response -eq "y" -or $response -eq "Y") {
Write-Host "Build artifacts pushed successfully!" -ForegroundColor Green
Write-Host "Waiting for CI/CD to deploy..." -ForegroundColor Cyan
} else {
Write-Host "No changes to commit" -ForegroundColor Yellow
Write-Host "No changes in dist directory to commit" -ForegroundColor Yellow
Write-Host "Note: Only dist directory changes will be committed, other files are ignored" -ForegroundColor Cyan
}
} else {
Write-Host "Skipping git push. You can manually commit and push later." -ForegroundColor Yellow