chore: 新版构建部署流程
This commit is contained in:
@@ -45,12 +45,13 @@ echo "📊 Build size: $BUILD_SIZE"
|
||||
read -p "Do you want to commit and push to repository? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
# 检查是否有未提交的更改
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
# 只检查 dist 目录的变化,不检查其他文件
|
||||
DIST_STATUS=$(git status --porcelain apps/web-antd/dist)
|
||||
if [ -n "$DIST_STATUS" ]; then
|
||||
echo "📝 Staging build artifacts..."
|
||||
# 只添加 dist 目录,不添加其他文件
|
||||
# 使用 -f 强制添加被 .gitignore 忽略的 dist 目录
|
||||
git add -f apps/web-antd/dist
|
||||
git add -A # 添加其他更改
|
||||
|
||||
echo "💾 Committing changes..."
|
||||
# 使用 --no-verify 跳过 pre-commit hooks,避免检查大量构建产物文件
|
||||
@@ -63,7 +64,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "✅ Build artifacts pushed successfully!"
|
||||
echo "⏳ Waiting for CI/CD to deploy..."
|
||||
else
|
||||
echo "ℹ️ No changes to commit"
|
||||
echo "ℹ️ No changes in dist directory to commit"
|
||||
echo "Note: Only dist directory changes will be committed, other files are ignored"
|
||||
fi
|
||||
else
|
||||
echo "ℹ️ Skipping git push. You can manually commit and push later."
|
||||
|
||||
Reference in New Issue
Block a user