Files
sanguo_quant_live/management/workflow/scripts/create_simple.sh
T
2026-03-23 17:11:28 +08:00

23 lines
756 B
Bash
Executable File
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
# 创建新任务脚本 - 彻底修复,简单直接方案
TASK_ID="TASK-$(date +%Y%m%d%H%M%S)"
TASK_FILE="management/tasks/pending/${TASK_ID}.md"
mkdir -p management/tasks/pending
echo "# 任务ID: $TASK_ID" > "$TASK_FILE"
echo "# 状态: pending" >> "$TASK_FILE"
echo "# 创建时间: $(date)" >> "$TASK_FILE"
echo "" >> "$TASK_FILE"
echo "## 任务需求" >> "$TASK_FILE"
echo "$1" >> "$TASK_FILE"
# 简单直接处理:pulladdcommitpush
git pull --rebase origin main > /dev/null 2>&1
git add "$TASK_FILE" > /dev/null 2>&1
git commit -m "feat: 创建新任务 $TASK_ID" > /dev/null 2>&1
git push origin main > /dev/null 2>&1
echo "✅ 任务创建成功: $TASK_ID"
echo "📄 文件: $TASK_FILE"
echo "🌐 已推送到 Gitee"