Skip to content

[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다#238

Merged
opficdev merged 19 commits intodevelopfrom
fix/#225-fastlane
Mar 10, 2026
Merged

[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다#238
opficdev merged 19 commits intodevelopfrom
fix/#225-fastlane

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev self-assigned this Mar 10, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 TestFlight 자동 배포 실패 문제를 해결하기 위해 Fastlane 설정을 개선합니다. 최신 TestFlight 빌드 번호를 동적으로 가져와 빌드 번호 충돌을 방지하고, CI 환경에서의 빌드 안정성을 높이는 데 중점을 둡니다. 이를 통해 배포 프로세스의 신뢰성을 향상시키고 수동 개입의 필요성을 줄입니다.

Highlights

  • 주요 상수 정의: Xcode 프로젝트, 앱 식별자, 타겟 이름을 위한 상수를 Fastfile 상단에 정의하여 재사용성을 높였습니다.
  • 최신 TestFlight 빌드 번호 가져오기: App Store Connect API를 사용하여 현재 버전의 최신 TestFlight 빌드 번호를 가져오는 fetch_latest_testflight_build_number 프라이빗 레인을 추가했습니다.
  • 빌드 번호 관리 개선: build_for_store 레인에서 TestFlight의 최신 빌드 번호를 기반으로 다음 빌드 번호를 자동으로 증가시키도록 로직을 수정했습니다.
  • CI 환경 설정 강화: CI 환경에서 Xcode 빌드 설정 타임아웃 및 재시도 횟수를 환경 변수로 제어하고, 코드 서명 설정을 명시적으로 업데이트하는 로직을 추가하여 안정성을 높였습니다.
  • Fastlane 레인 이름 변경 및 추가: beta 레인을 deploy_testflight로 이름을 변경하고, 빌드만 수행하는 testflight_build_only 레인을 새로 추가했습니다.
  • .gitignore 업데이트: fastlane/README.md 파일을 .gitignore에 추가하여 불필요한 파일이 커밋되지 않도록 했습니다.
Changelog
  • .gitignore
    • fastlane/README.md 파일을 무시 목록에 추가했습니다.
  • fastlane/Fastfile
    • XCODE_PROJ, APP_IDENTIFIER, TARGET_NAME 상수를 파일 상단에 정의했습니다.
    • fetch_latest_testflight_build_number 프라이빗 레인을 추가하여 App Store Connect에서 최신 빌드 번호를 조회합니다.
    • build_for_store 레인에 FASTLANE_XCODEBUILD_SETTINGS_TIMEOUTFASTLANE_XCODEBUILD_SETTINGS_RETRIES 환경 변수 기본값을 설정했습니다.
    • build_for_store 레인에서 get_version_numberfetch_latest_testflight_build_number를 사용하여 빌드 번호를 동적으로 결정하고 1 증가시켰습니다.
    • match 액션에 development 타입을 추가했습니다.
    • CI 환경에서 update_code_signing_settings를 사용하여 프로비저닝 프로파일을 명시적으로 설정하도록 로직을 추가했습니다.
    • build_app 액션에 xcargs: "-skipPackagePluginValidation" 옵션을 추가했습니다.
    • beta 레인의 이름을 deploy_testflight로 변경했습니다.
    • build_for_store 레인만 호출하는 testflight_build_only 레인을 새로 추가했습니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/build.yml
    • .github/workflows/release.yml
    • .github/workflows/testflight.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@opficdev opficdev merged commit be6c78e into develop Mar 10, 2026
1 check failed
@opficdev opficdev deleted the fix/#225-fastlane branch March 10, 2026 01:49
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. 테스트플라이트 자동 배포 실패 문제를 해결하기 위한 PR을 리뷰했습니다.

App Store Connect API를 통해 최신 빌드 번호를 가져와 1을 더하는 방식으로 빌드 번호 충돌 문제를 해결한 점이 인상적입니다. 이는 기존 GITHUB_RUN_NUMBER를 사용하는 방식보다 훨씬 안정적인 해결책입니다.

Fastfile의 가독성과 유지보수성을 높이기 위해 몇 가지 스타일 관련 제안을 드렸습니다. Ruby의 컨벤션에 따라 변수명을 snake_case로 변경하는 것을 고려해 주세요.

전반적으로 훌륭한 개선이며, 자동 배포 프로세스의 안정성을 크게 향상시킬 것으로 기대됩니다.

I am having trouble creating individual review comments. Click here to see my feedback.

fastlane/Fastfile (11-23)

medium

Ruby에서는 변수나 메소드 이름에 snake_case를 사용하는 것이 일반적인 컨벤션입니다. apiKeyversionNumberapi_keyversion_number로 수정하여 코드의 일관성과 가독성을 높이는 것을 제안합니다.

    api_key = options[:api_key]
    version_number = options[:version]

    Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create(**api_key)

    app = Spaceship::ConnectAPI::App.find(APP_IDENTIFIER)
    UI.user_error!("Could not find app for #{APP_IDENTIFIER}") if app.nil?

    filter = {
      "state" => "PROCESSING,FAILED,COMPLETE",
      "cfBundleShortVersionString" => version_number,
      "platform" => Spaceship::ConnectAPI::Platform.map("ios")
    }

fastlane/Fastfile (57-72)

medium

Ruby 컨벤션에 따라 변수명에 snake_case를 사용하는 것이 좋습니다. versionNumberlatestTestflightBuildNumber를 각각 version_numberlatest_testflight_build_number로 변경하는 것을 제안합니다. 이는 코드 전체의 일관성을 유지하는 데 도움이 됩니다.

    version_number = get_version_number(
      xcodeproj: XCODE_PROJ,
      target: TARGET_NAME
    )

    latest_testflight_build_number = fetch_latest_testflight_build_number(
      api_key: api_key,
      version: version_number
    )

    setup_ci if ENV["CI"]

    increment_build_number(
      xcodeproj: XCODE_PROJ,
      build_number: latest_testflight_build_number + 1
    )

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant