fix: 원격 배포 rsync 제외 패턴이 소스를 잘못 걸러내던 문제 수정

tar 기반 rsync 대체 스크립트가 rsync 의 'node_modules/' 문법을 매칭하지
못해 node_modules 를 통째로 전송하다 메모리 부족으로 죽었다. 반대로
슬래시만 떼면 'build' 가 자바 패키지 kakao.response.build 까지 제외해
kakaoChatbotSkill 컴파일이 깨졌다. 선행 슬래시를 전송 루트 기준 고정으로
해석하도록 구분해 둘 다 해결한다.

배포 중 자동 커밋에 딸려 들어갔던 일회용 진단 스크립트도 함께 제거한다.
This commit is contained in:
bkyungee
2026-08-13 15:07:36 +09:00
parent 493b07ec30
commit 78d549194c
4 changed files with 13 additions and 40 deletions
+7 -1
View File
@@ -105,7 +105,13 @@ TAR_EXCLUDES=()
for pat in "${EXCLUDES[@]}"; do
# tar 의 --exclude 는 'node_modules/' 처럼 슬래시로 끝나면 디렉터리에 매칭되지 않는다.
# (rsync 문법 그대로 넘기면 node_modules 가 통째로 전송돼 메모리 부족으로 죽는다)
TAR_EXCLUDES+=(--exclude "${pat%/}")
pat="${pat%/}"
if [[ "${pat}" == /* ]]; then
# rsync 의 선행 슬래시 = 전송 루트 기준 고정. tar 멤버명은 './' 로 시작한다.
TAR_EXCLUDES+=(--anchored --exclude ".${pat}")
else
TAR_EXCLUDES+=(--no-anchored --exclude "${pat}")
fi
done
ssh -o BatchMode=yes "${HOST}" "mkdir -p '${REMOTE_PATH}'"