-
Notifications
You must be signed in to change notification settings - Fork 0
[#225] 테스트플라이트 자동 배포가 실패하는 현상을 해결한다 #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8696137
style: 정확하게 테플이라는 이름 명시
opficdev 6772079
refactor: 앱 빌드 시간 단축
opficdev d4fc32f
chore: fastlane/README.md 추적 끄기
opficdev 1822757
test: lint 모듈 validation 스킵
opficdev e8dc7d4
fix: 내부 testflight 이름과 겹치는 현상 수정
opficdev c02c960
fix: export_method 수정
opficdev 0c61521
chore: 테스트플라이트 CI 배포 서명 설정 수정
opficdev ae00be7
chore: 테스트플라이트 CI 서명 옵션 보정
opficdev 2ba7707
fix: fastlane 배포용 인증서 설치 흐름 수정
opficdev 51c4b57
feat: Apple Store Connect에 올라간 최신 빌드 번호 + 1 형태로 새 빌드 번호를 규정하도록 추가
opficdev e4fef3f
feat: 타깃의 Release 서명을 수동으로 고정
opficdev 34b6453
style: 문자열 상수화
opficdev 96ecc93
fix: Apple Store Connect에서 최신 빌드번호를 조회하지 못하는 이슈 해결
opficdev 550568b
fix: fastlane 대신 spaceship을 통해 가져오도록 변경
opficdev 617b704
Merge branch 'develop' into fix/#225-fastlane
opficdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,39 @@ TARGET_NAME = "DevLog" | |
| default_platform(:ios) | ||
|
|
||
| platform :ios do | ||
| private_lane :fetch_latest_testflight_build_number do |options| | ||
| require "spaceship" | ||
|
|
||
| versionNumber = options[:version] | ||
|
|
||
| Spaceship::ConnectAPI.token = Spaceship::ConnectAPI::Token.create( | ||
| key_id: ENV["ASC_KEY_ID"], | ||
| issuer_id: ENV["ASC_ISSUER_ID"], | ||
| key: File.binread(ENV["ASC_KEY_PATH"]), | ||
| in_house: false | ||
| ) | ||
|
Comment on lines
+13
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| 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" => versionNumber, | ||
| "platform" => Spaceship::ConnectAPI::Platform.map("ios") | ||
| } | ||
|
|
||
| build = Spaceship::ConnectAPI.get_build_uploads( | ||
| app_id: app.id, | ||
| filter: filter, | ||
| sort: "-uploadedDate", | ||
| limit: 1 | ||
| ).first | ||
|
|
||
| next 0 if build.nil? | ||
|
|
||
| next build.cf_build_version.to_i | ||
| end | ||
|
|
||
| private_lane :asc_api_key do | ||
| app_store_connect_api_key( | ||
| key_id: ENV["ASC_KEY_ID"], | ||
|
|
@@ -30,11 +63,8 @@ platform :ios do | |
| target: TARGET_NAME | ||
| ) | ||
|
|
||
| latestTestflightBuildNumber = app_store_build_number( | ||
| live: false, | ||
| app_identifier: APP_IDENTIFIER, | ||
| version: versionNumber, | ||
| initial_build_number: 0 | ||
| latestTestflightBuildNumber = fetch_latest_testflight_build_number( | ||
| version: versionNumber | ||
| ) | ||
|
|
||
| setup_ci if ENV["CI"] | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
성능 향상을 위해
require "spaceship"구문을 파일 최상단으로 옮기는 것이 좋습니다.require는 lane 내부에서 호출될 때마다 실행되지만, 파일 상단에 있으면 Fastfile 로드 시 한 번만 실행됩니다. 이 줄을 삭제하고 파일 상단(예: 4번째 줄 다음)에 추가해주세요.