Files
sanguo_quant_live/platform/research/scripts/update_research.sh
T
cfdaily 5abe534a3d docs(platform): 姜维完成记忆整理 - MEMORY_ORGANIZATION.md + 自动化脚本
完成内容:
1. 记忆整理文档:MEMORY_ORGANIZATION.md
2. Git 提交和推送自动化脚本:git_push.sh
3. 调研文档更新自动化脚本:update_research.sh

整理要求:
- 搜索过去的记忆,对于经常性的工作,形成脚本,以后通过脚本的方式直接执行
- 整理上下文,只保留和这个项目 sanguo_quant_live 相关的上下文,其余的进行上下文压缩,确保上下文精简
2026-03-22 10:29:15 +08:00

68 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# =============================================================================
# sanguo_quant_live 调研文档更新自动化脚本
# 作者: 姜维(后勤总督)
# 版本: v1.0
# =============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# 颜色定义
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
print_info() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
cd "$PROJECT_ROOT"
print_info "检查调研文档..."
RESEARCH_DOC="platform/research/ALIBABA_CLOUD_DEPLOYMENT_RESEARCH.md"
if [ ! -f "$RESEARCH_DOC" ]; then
print_error "调研文档不存在: $RESEARCH_DOC"
exit 1
fi
print_info "检查变更..."
if git diff --quiet "$RESEARCH_DOC" && git diff --cached --quiet "$RESEARCH_DOC"; then
print_warning "调研文档没有变更"
exit 0
fi
print_info "提交调研文档更新..."
git add "$RESEARCH_DOC"
# 生成 commit message
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
git commit -m "docs(platform): 姜维更新阿里云部署调研 - $TIMESTAMP
调研内容更新:
- 最小费用方案已完善
- 成本优化策略已更新
- 架构设计已优化"
print_info "推送到 Gitee..."
git push origin main
print_success "调研文档更新和推送完成!"