branch_list 주석 허용, alias 기능 추가
This commit is contained in:
@@ -96,8 +96,11 @@ jobs:
|
||||
}
|
||||
|
||||
process_entry() {
|
||||
local entry branch_name source_repo source_repo_url start_epoch backup_mode
|
||||
entry="$(echo "$1" | xargs)" # trim whitespace
|
||||
local entry_raw entry alias_name branch_name source_repo source_repo_url start_epoch backup_mode
|
||||
entry_raw="$1"
|
||||
# Remove inline comments and trim
|
||||
entry="${entry_raw%%#*}"
|
||||
entry="$(echo "$entry" | xargs)" # trim whitespace
|
||||
start_epoch=$(date +%s)
|
||||
backup_mode="미확인"
|
||||
|
||||
@@ -105,6 +108,14 @@ jobs:
|
||||
return
|
||||
fi
|
||||
|
||||
# Support alias via comma: sourceRepo/branch,aliasRepo
|
||||
alias_name=""
|
||||
if [[ "$entry" == *","* ]]; then
|
||||
IFS=',' read -r entry alias_name <<< "$entry"
|
||||
entry="$(echo "$entry" | xargs)"
|
||||
alias_name="$(echo "$alias_name" | xargs)"
|
||||
fi
|
||||
|
||||
if [[ "$entry" != */* ]]; then
|
||||
echo "::warning::Entry '${entry}' is missing sourceRepo/branch format. Skipping."
|
||||
return
|
||||
@@ -133,6 +144,9 @@ jobs:
|
||||
elif [[ "${branch_name}" == "develop_"* ]]; then
|
||||
repo_name="${branch_name#develop_}"
|
||||
fi
|
||||
if [[ -n "${alias_name}" ]]; then
|
||||
repo_name="${alias_name}"
|
||||
fi
|
||||
echo "Target repository name: ${repo_name}"
|
||||
|
||||
# Skip if the source branch does not exist or is empty
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
dev_Net8.git/Develop_Net8
|
||||
dev_Net8.git/Develop_Net8_bridge
|
||||
dev_Net8.git/Develop_Net8_Graphics
|
||||
dev_Net8.git/Develop_Net8_Graphics_B
|
||||
dev_Net8.git/Develop_Net8_Graphics_ModelerUI
|
||||
dev_Net8.git/Develop_Net8_heh
|
||||
dev_Net8.git/Develop_Net8_Strana
|
||||
@@ -11,6 +12,7 @@ dev.git/develop
|
||||
dev.git/develop_boxzainer
|
||||
dev.git/develop_boxzainer_demo
|
||||
dev.git/develop_brizainer
|
||||
dev.git/develop_heh, dev_heh
|
||||
dev.git/develop_hmEG
|
||||
dev.git/develop_hmEG_DotNET_7
|
||||
dev.git/develop_tunnelzainer
|
||||
|
||||
1
to-do.md
1
to-do.md
@@ -17,3 +17,4 @@
|
||||
2025-12-16 09:46:30 KST 추가 업데이트: mirror.yml에서 기존 타겟 클론을 없애고 임시 bare repo를 직접 init 후 source 브랜치만 fetch(--no-tags)하여 푸시하도록 변경, 불필요한 대상 전체 클론을 제거해 데이터 전송 최소화.
|
||||
2025-12-16 09:48:20 KST 추가 업데이트: mirror.yml에서 타겟이 새로 생성된 경우 소스 브랜치를 `git clone --bare --single-branch`로 전체 클론 후 push, 기존 타겟이 있을 때만 빈 bare repo를 init해 필요한 브랜치만 fetch→push 하도록 분기. 생성된 경우에도 백업 모드/알림이 “신규 전체 백업”으로 정확히 표시되도록 just_created 플래그를 추가.
|
||||
2025-12-16 11:10:39 KST 추가 업데이트: 증분 경로에서 빈 bare init 후 타겟 main을 `fetch --no-tags`로 선반입해 객체를 시드한 뒤 소스 브랜치 fetch를 수행하도록 변경, 델타 전송을 활용해 변경량이 적을 때 트래픽을 줄이도록 개선.
|
||||
2025-12-16 13:28:01 KST 추가 업데이트: mirror.yml에 branch_list 주석(`#`) 스킵 및 `sourceRepo/branch,alias` 구문을 추가해, 콤마 뒤의 별도 저장소 이름(alias)으로 타겟을 지정할 수 있도록 개선.
|
||||
|
||||
Reference in New Issue
Block a user