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
|
||||
|
||||
Reference in New Issue
Block a user