Skip to content

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

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

[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다#235
opficdev merged 16 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!

이 풀 리퀘스트는 TestFlight 자동 배포가 실패하는 문제를 해결하기 위해 Fastlane 설정을 개선합니다. 주요 변경 사항은 App Store Connect API를 통해 최신 TestFlight 빌드 번호를 동적으로 가져와 빌드 번호 충돌을 방지하고, CI 환경에서 코드 서명 프로세스를 안정화하는 데 중점을 둡니다. 이를 통해 배포 파이프라인의 견고성과 신뢰성을 향상시킵니다.

Highlights

  • Fastlane 설정 개선: fetch_latest_testflight_build_number라는 새로운 비공개 레인을 추가하여 App Store Connect API에서 최신 빌드 번호를 가져오도록 했습니다.
  • 빌드 번호 관리: build_for_store 레인을 수정하여 GITHUB_RUN_NUMBER 대신 새로 가져온 빌드 번호를 사용하여 빌드 번호를 증가시키도록 했습니다.
  • 프로젝트 상수 정의: XCODE_PROJ, APP_IDENTIFIER, TARGET_NAME과 같은 프로젝트 관련 상수를 정의했습니다.
  • CI 환경 코드 서명 안정화: CI 환경에서 코드 서명 설정을 업데이트하는 로직을 추가하여 배포 프로세스의 안정성을 높였습니다.
  • 빌드 옵션 추가: build_app 액션에 xcargs: "-skipPackagePluginValidation"을 추가했습니다.
  • 레인 이름 변경 및 추가: beta 레인의 이름을 deploy_testflight로 변경하고, testflight_build_only라는 새로운 레인을 추가했습니다.
  • Git 무시 파일 업데이트: .gitignore 파일에 fastlane/README.md를 추가하여 무시하도록 했습니다.
Changelog
  • .gitignore
    • fastlane/README.md를 무시 목록에 추가했습니다.
  • fastlane/Fastfile
    • XCODE_PROJ, APP_IDENTIFIER, TARGET_NAME 상수를 정의했습니다.
    • App Store Connect API를 사용하여 최신 TestFlight 빌드 번호를 가져오는 fetch_latest_testflight_build_number 비공개 레인을 구현했습니다.
    • build_for_store 비공개 레인을 업데이트하여 get_version_numberfetch_latest_testflight_build_number를 사용하여 빌드 번호를 동적으로 설정하도록 했습니다.
    • CI 환경에서 development 매치 유형을 추가하고, 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
Activity
  • 이 풀 리퀘스트에 대한 특정 활동(예: 댓글, 검토)은 발견되지 않았습니다.
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 6b9f904 into develop Mar 10, 2026
1 check failed
@opficdev opficdev deleted the fix/#225-fastlane branch March 10, 2026 01:28
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은 테스트플라이트 자동 배포 실패 현상을 해결하기 위해 Fastlane 스크립트를 개선했습니다. App Store Connect API를 이용해 최신 빌드 번호를 가져와서 자동으로 빌드 번호를 증가시키는 방식으로, 수동으로 빌드 번호를 관리하거나 GITHUB_RUN_NUMBER를 사용할 때 발생할 수 있는 충돌 문제를 해결했습니다. 또한, CI 환경에서의 코드 서명 과정을 명시적으로 처리하여 안정성을 높였습니다. 전반적으로 자동 배포 프로세스를 견고하게 만드는 좋은 변경입니다. 다만, Ruby 코드 스타일 가이드에 따라 일부 변수명을 snake_case로 변경하는 것을 제안하는 몇 가지 리뷰 의견을 남겼습니다.

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

fastlane/Fastfile (11-28)

medium

Ruby에서는 변수명에 snake_case를 사용하는 것이 일반적인 컨벤션입니다. versionNumberascKeyPath를 각각 version_numberasc_key_path로 변경하는 것을 제안합니다.

    version_number = options[:version]
    asc_key_path = File.expand_path(ENV["ASC_KEY_PATH"], Dir.pwd)

    Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create(
      key_id: ENV["ASC_KEY_ID"],
      issuer_id: ENV["ASC_ISSUER_ID"],
      key: File.binread(asc_key_path),
      in_house: false
    )

    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 (62-76)

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(
      version: version_number
    )

    setup_ci if ENV["CI"]

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

fastlane/Fastfile (91-103)

medium

Ruby 컨벤션에 따라 변수명에 snake_case를 사용하는 것이 좋습니다. provisioningProfileSpecifierprovisioning_profile_specifier로 변경하는 것을 제안합니다.

      provisioning_profile_specifier = lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING][APP_IDENTIFIER].to_s
      UI.user_error!("Missing App Store provisioning profile mapping for #{APP_IDENTIFIER}") if provisioning_profile_specifier.empty?

      update_code_signing_settings(
        use_automatic_signing: false,
        path: XCODE_PROJ,
        sdk: "iphoneos*",
        team_id: ENV["APP_STORE_TEAM_ID"],
        targets: [TARGET_NAME],
        build_configurations: ["Release"],
        code_sign_identity: "Apple Distribution",
        profile_name: provisioning_profile_specifier
      )

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