Deploy: exdev sync 2026-07-28 09:40:42

This commit is contained in:
Macbook
2026-07-28 09:40:42 +09:00
parent f85e4adc35
commit 1ee28f3a4d
8 changed files with 41 additions and 59 deletions
+7 -13
View File
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
# 로컬 monorepo + GitHub submodule 포인터 → Gitea push (post-receive 배포 트리거)
# 로컬 monorepo(현재 소스) → Gitea push (post-receive / 원격 배포 트리거)
#
# ./server-dev/push-to-gitea.sh
# ./server-dev/push-to-gitea.sh --dry-run
#
# 공식 GitHub(KoreaExpressWayCorp) 에는 push 하지 않음.
# 공식 GitHub 반영은 ./git_fetch_all.sh 전용.
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
@@ -14,7 +17,7 @@ for arg in "$@"; do
case "$arg" in
--dry-run) DRY_RUN=true ;;
-h|--help)
sed -n '2,6p' "$0"
sed -n '2,10p' "$0"
exit 0
;;
*)
@@ -36,16 +39,7 @@ if [[ ! -f .gitmodules ]]; then
fail ".gitmodules 없음 — submodule 설정 후 다시 실행"
fi
if [[ -x "${ROOT_DIR}/git_fetch_all.sh" ]]; then
log "GitHub submodule 동기화..."
if ! $DRY_RUN; then
"${ROOT_DIR}/git_fetch_all.sh"
else
"${ROOT_DIR}/git_fetch_all.sh" --dry-run
fi
else
warn "git_fetch_all.sh 없음 — submodule GitHub 동기화 생략"
fi
log "공식 GitHub 동기화/push 생략 (Gitea 전용 배포)"
# 서버 env.template·overlay와 중복되는 submodule 작업트리 변경은 되돌림
reset_submodule_noise() {
@@ -94,7 +88,7 @@ done
git add -u
if ! git diff --cached --quiet; then
msg="Deploy: GitHub submodule sync $(date '+%Y-%m-%d %H:%M:%S')"
msg="Deploy: exdev sync $(date '+%Y-%m-%d %H:%M:%S')"
log "monorepo 커밋: ${msg}"
git commit -m "${msg}"
else