Skip to content

[Chore] - 신규 클론 환경 자동 셋업 스크립트(bin/setup) 추가#302

Merged
thingineeer merged 1 commit intodevelopfrom
chore/v2.5.0-setup-script
Apr 26, 2026
Merged

[Chore] - 신규 클론 환경 자동 셋업 스크립트(bin/setup) 추가#302
thingineeer merged 1 commit intodevelopfrom
chore/v2.5.0-setup-script

Conversation

@thingineeer
Copy link
Copy Markdown
Collaborator

@thingineeer thingineeer commented Apr 26, 2026

🌱 작업한 내용

신규 머신/회사 환경에서도 한 줄로 빌드 가능 상태가 되도록 셋업 자동화.

git clone https://github.com/Runnect/Runnect-iOS.git
cd Runnect-iOS
gh auth login        # 한 번만
./bin/setup

./bin/setup 이 하는 일:

  1. gh CLI / 인증 / 디렉토리 위치 사전 체크
  2. thingineeer/thingineeer-env 를 임시 디렉토리에 --depth=1 클론
  3. Runnect-env/ 의 비밀 파일 3종을 메인 레포 정해진 경로로 복사
    • Config.swiftRunnect-iOS/Runnect-iOS/Network/Foundation/Config.swift
    • AdConfig.swiftRunnect-iOS/Runnect-iOS/Network/Foundation/AdConfig.swift
    • GoogleService-Info.plistRunnect-iOS/Runnect-iOS/GoogleService-Info.plist
  4. 각 파일이 .gitignore 에 의해 추적 해제 상태인지 검증
  5. 임시 디렉토리 자동 정리 (trap)

🌱 PR Point

  • 인증 게이트: gh repo clone thingineeer/thingineeer-env 가 권한 없는 계정에서는 자동 실패. 별도 비밀번호/토큰 관리 불필요 — gh CLI 본인 인증 그대로 활용
  • 중요 파일 누락 방지: 이번 세션에서 GoogleService-Info.plist 가 백업 누락된 상황을 발견했었음. 셋업 스크립트가 3종 + .gitignore 검증까지 강제
  • 재실행 안전: 같은 파일을 덮어쓰는 식이라 secret 갱신 후 재실행만으로 동기화 가능

성과 기록

  • 실제 실행 테스트 통과 (3/3 파일 정상 배치 + .gitignore 검증)
  • 셋업 시간: 수 초
  • 안내 문서 통합: README.md(공용) + CLAUDE.md(AI 도구용 보안 섹션)

Summary by CodeRabbit

  • New Features

    • Added automated setup script that streamlines initial project configuration by automatically fetching and placing sensitive configuration files.
  • Documentation

    • Updated setup documentation with comprehensive instructions, including GitHub CLI authentication requirements and secure configuration file management.

- gh CLI 인증을 활용해 private 레포(thingineeer/thingineeer-env)의 Runnect-env에서 비밀 파일 3종을 메인 레포 내 정해진 경로로 자동 배치
- Config.swift / AdConfig.swift / GoogleService-Info.plist 모두 .gitignore 등록 상태 검증까지 포함
- 권한 없는 계정에선 gh repo clone 단계에서 자동 차단되어 secret 노출 위험 없음
- README와 CLAUDE.md에 신규 셋업 흐름 명시
@thingineeer thingineeer added Chore 그 외의 잡일/버전 코드 수정, 패키지 구조 변경, 파일 이동, 파일 이름 변경, 레이아웃 조정 등 명진😼 labels Apr 26, 2026
@thingineeer thingineeer self-assigned this Apr 26, 2026
@thingineeer thingineeer added Chore 그 외의 잡일/버전 코드 수정, 패키지 구조 변경, 파일 이동, 파일 이름 변경, 레이아웃 조정 등 명진😼 labels Apr 26, 2026
@thingineeer thingineeer merged commit d3c9887 into develop Apr 26, 2026
1 check passed
@thingineeer thingineeer deleted the chore/v2.5.0-setup-script branch April 26, 2026 03:38
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 021ad004-f519-48b5-8fb6-da1c17968843

📥 Commits

Reviewing files that changed from the base of the PR and between 3d59fac and 73b8084.

📒 Files selected for processing (3)
  • CLAUDE.md
  • README.md
  • bin/setup

📝 Walkthrough

Walkthrough

Documentation is updated to guide developers through a new automated setup process for managing sensitive configuration files. A new bin/setup script automates retrieval and placement of secret files from a private repository using GitHub CLI authentication, replacing manual clone-and-copy procedures.

Changes

Cohort / File(s) Summary
Documentation & Setup Guidance
CLAUDE.md, README.md
Updated security documentation to specify Firebase and build config files in a private repository; documented new setup workflow using gh auth login and ./bin/setup script execution with access restrictions for unauthorized accounts.
Automated Setup Automation
bin/setup
New Bash script that validates prerequisites (gh CLI, GitHub auth, working directory), clones the private thingineeer/thingineeer-env repository, copies three secret files (Config.swift, AdConfig.swift, GoogleService-Info.plist) to their target locations, and validates git ignore status.

Sequence Diagram

sequenceDiagram
    actor Developer
    participant setup as bin/setup Script
    participant gh as GitHub CLI (gh)
    participant PrivateRepo as Private Repository<br/>(thingineeer-env)
    participant LocalRepo as Local Repository<br/>(Runnect-iOS)

    Developer->>setup: Execute ./bin/setup
    activate setup
    setup->>setup: Validate prerequisites<br/>(gh CLI, auth, directory)
    setup->>gh: Authenticate session check
    gh-->>setup: Auth status confirmed
    setup->>gh: Clone private repository<br/>(Runnect-env subdir)
    gh->>PrivateRepo: Request repository access
    PrivateRepo-->>gh: Return repository contents
    gh-->>setup: Clone successful
    setup->>setup: Iterate secret file mappings
    setup->>LocalRepo: Copy Config.swift
    setup->>LocalRepo: Copy AdConfig.swift
    setup->>LocalRepo: Copy GoogleService-Info.plist
    setup->>LocalRepo: Validate git ignore status
    LocalRepo-->>setup: Ignore status confirmed
    setup-->>Developer: Setup complete ✓
    deactivate setup
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A script hops into place with care,
Secrets fetched from repos so rare,
gh auth login, then setup runs,
Configuration done—no manual funs! ✨
Xcode builds without a care.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/v2.5.0-setup-script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore 그 외의 잡일/버전 코드 수정, 패키지 구조 변경, 파일 이동, 파일 이름 변경, 레이아웃 조정 등 명진😼

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant