Files
ai_site/pull-and-restart.sh
whm 0445fc6fcc chore: mark Linux deploy scripts executable in git
Avoid Permission denied on production when running ./restart.sh after pull.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 16:32:09 +08:00

14 lines
530 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.
#!/usr/bin/env bash
# AI 建站 — 拉取代码并重启(生产一键更新)
# 用法:./pull-and-restart.sh
# 等价:./restart.sh --pull
# 默认仓库https://gitea.yuxindazhineng.com/whm/ai_site.git
# 环境变量:
# AIJZ_GIT_URL 覆盖仓库地址
# GIT_BRANCH 分支(默认 main
# FORCE_GIT_RESET 默认 1硬对齐并丢弃已跟踪文件的本地改动保留 .env 等未跟踪文件)
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
cd "$ROOT"
exec "$ROOT/restart.sh" --pull