class_hour_record/.cozeproj/scripts/deploy_build.sh

20 lines
553 B
Bash
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
set -Eeuo pipefail
cd "${COZE_WORKSPACE_PATH}"
if [ -f "./.cozeproj/scripts/init_env.sh" ]; then
echo "⚙️ Initializing environment..."
# 使用 bash 执行,确保即使没有 x 权限也能跑
bash ./.cozeproj/scripts/init_env.sh
else
echo "⚠️ Warning: init_env.sh not found, skipping environment init."
fi
echo "Installing dependencies..."
# 安装所有依赖(包含 Taro 核心和 React
pnpm install
echo "Building the Taro project..."
pnpm build
echo "Build completed successfully! Assets are in /dist"