Files
height_manager/.cozeproj/scripts/dev_build.sh
jaystar 28c4d7b3b4 feat: 实现减脂体重管理App完整功能
- 实现拍照识别食物功能(集成大语言模型视觉能力)
- 实现智能对话功能(集成大语言模型流式输出)
- 实现食物记录和卡路里管理功能
- 实现体重记录和统计功能
- 实现健康数据管理页面
- 配置数据库表结构(用户、食物记录、体重记录)
- 实现Express后端API路由
- 配置Tab导航和前端页面
- 采用健康运动配色方案
2026-02-02 15:17:50 +08:00

47 lines
1.5 KiB
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
if [ -z "${BASH_VERSION:-}" ]; then exec /usr/bin/env bash "$0" "$@"; fi
set -euo pipefail
ROOT_DIR="$(pwd)"
PREVIEW_DIR="${COZE_PREVIEW_DIR:-/source/preview}"
# ==================== 配置项 ====================
SERVER_DIR="app"
EXPO_DIR="expo"
CHECK_HASH_SCRIPT="$ROOT_DIR/check_hash.py"
check_command() {
if ! command -v "$1" &> /dev/null; then
echo "error:命令 $1 未找到,请先安装"
fi
}
echo "==================== 开始构建 ===================="
echo "检查根目录 pre_install.py"
if [ -f "$PREVIEW_DIR/pre_install.py" ]; then
echo "执行python $PREVIEW_DIR/pre_install.py"
python "$PREVIEW_DIR/pre_install.py" || echo "pre_install.py 执行失败"
fi
echo "开始执行构建脚本build_dev.sh..."
echo "正在检查依赖命令是否存在..."
# 检查核心命令
check_command "pnpm"
check_command "npm"
echo "==================== 安装项目依赖 ===================="
if [ ! -f "package.json" ]; then
echo "项目目录下无 package.json不是合法的 Node.js 项目"
fi
# 步骤 2.1/2.2:安装项目依赖
pnpm install --registry=https://registry.npmmirror.com || echo "Expo 项目依赖安装失败pnpm 执行出错)"
echo "检查根目录 post_install.py"
if [ -f "$PREVIEW_DIR/post_install.py" ]; then
echo "执行python $PREVIEW_DIR/post_install.py"
python "$PREVIEW_DIR/post_install.py" || echo "post_install.py 执行失败"
fi
echo "==================== 依赖安装完成!====================\n"
echo "下一步:执行 ./deploy_run.sh 启动服务"