Files
Agent-System/scripts/git-push-dev.sh
weichenandCursor 9598705fc7 chore(ops): add test env smoke script and document test soak pass.
Provide git-push-dev helper, DEP-001 smoke checks for test compose, and update E2E/soak test report.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:23 +00:00

24 lines
683 B
Bash
Executable File
Raw Permalink 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.
#!/usr/bin/env bash
# 使用 ~/.secrets/gitea 推送 dev 分支(不写入 git config)
set -eo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SECRETS="${HOME}/.secrets/gitea"
BRANCH="${1:-dev}"
if [[ ! -f "${SECRETS}" ]]; then
echo "[错误] 未找到 ${SECRETS}"
exit 1
fi
TOKEN=$(grep -E '^- ACCESS_TOKEN=' "${SECRETS}" | sed 's/^- ACCESS_TOKEN=//')
PREFIX=$(grep -E '^- URL_PREFIX=' "${SECRETS}" | sed 's/^- URL_PREFIX=//')
if [[ -z "${TOKEN}" || -z "${PREFIX}" ]]; then
echo "[错误] ${SECRETS} 缺少 ACCESS_TOKEN 或 URL_PREFIX"
exit 1
fi
cd "${ROOT_DIR}"
git push "https://oauth2:${TOKEN}@${PREFIX}/weichen/Agent-System.git" "${BRANCH}"