Skip to content

[Chore] directory-cleaner.bash 작성#231

Merged
willjsw merged 1 commit into
developfrom
chore/#215-directory-architecture-revise
Nov 3, 2025
Merged

[Chore] directory-cleaner.bash 작성#231
willjsw merged 1 commit into
developfrom
chore/#215-directory-architecture-revise

Conversation

@willjsw

@willjsw willjsw commented Oct 27, 2025

Copy link
Copy Markdown
Collaborator

🛠️ Issue Number

closes #215

📌 작업 내용 및 특이사항

  • 임시 .gitkeep 파일 삭제
  • 각 도메인 별 application / controller / infrastructure 하위 폴더 평탄화 위한 bash 파일 작성
#!/bin/bash

BASE_DIR="../src/main/java/com/irum/come2us/domain"
TARGET_SUBDIRS=("application" "infrastructure" "presentation")

echo ".gitkeep 파일 삭제"

find "$BASE_DIR" -name ".gitkeep" -delete

for MODULE_DIR in $(find "$BASE_DIR" -mindepth 1 -maxdepth 1 -type d ); do

  echo "$MODULE_DIR"

  for SUB_DIR_NAME in "${TARGET_SUBDIRS[@]}"; do

    SOURCE_PATH="$MODULE_DIR/$SUB_DIR_NAME"

    if [ -d "$SOURCE_PATH" ]; then
      echo "$SUB_DIR_NAME 내부 파일 이동: $SOURCE_PATH -> $MODULE_DIR"
      mv -n "$SOURCE_PATH"/* "$MODULE_DIR"

      if [ -z "$(ls -A "$SOURCE_PATH")" ]; then
        rmdir "$SOURCE_PATH"
        echo "빈 폴더 삭제: $SOURCE_PATH"
      else
        echo "$SOURCE_PATH 폴더 비어있지 않음"

      fi
    fi

  done

done

실행방법(참고만 할 것, 실행시킬 시 로컬 폴더 날리고 다시 받아야 함)

image

📚 참고사항

  • 디렉토리 구조 바꾼 뒤에도 모든 파일 import 문 수정 필요

@willjsw willjsw added this to the Sprint 3 milestone Oct 27, 2025
@willjsw willjsw self-assigned this Oct 27, 2025
@willjsw willjsw added the ⚙️ chore 환경파일 작성, CI 설정 등 기타 프로젝트를 위한 설정을 추가합니다. label Oct 27, 2025
@willjsw willjsw changed the title chore #215: 디렉토리 구조 평탄화 bash 스크립트 작성 및 .gitkeep 파일 제거 [Chore] directory-cleaner.bash 작성 Oct 27, 2025
@isak-kang

Copy link
Copy Markdown
Contributor

고생하셨습니다!
나중에 1차 끝나고 디렉토리 구조 바꾸실 때 승인하도록 하겠습니다!!

@Bal1oon Bal1oon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@willjsw
willjsw merged commit 997f744 into develop Nov 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ chore 환경파일 작성, CI 설정 등 기타 프로젝트를 위한 설정을 추가합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] Directory Architecture 수정

3 participants