Skip to content

[fix] Makefile base64 파싱 및 IPA 경로 버그 수정#9

Merged
hyejj19 merged 2 commits intomainfrom
fix/makefile-base64-and-ipa-path
Feb 10, 2026
Merged

[fix] Makefile base64 파싱 및 IPA 경로 버그 수정#9
hyejj19 merged 2 commits intomainfrom
fix/makefile-base64-and-ipa-path

Conversation

@hyejj19
Copy link
Copy Markdown
Collaborator

@hyejj19 hyejj19 commented Feb 10, 2026

Summary

  • cut -d '=' -f2.env.prod 값을 파싱할 때 base64 패딩 =가 구분자로 잘려나가 ASC API 키가 손상되는 버그 수정 → sed 사용
  • fastlane 실행 시 IPA_PATH가 상대경로로 전달되어 ios/ 디렉토리 기준에서 파일을 찾지 못하는 버그 수정 → $(pwd)/ 절대경로 사용
  • env 서브모듈 최신화

Test plan

  • make deploy-ios TestFlight 업로드 성공 확인 완료

🤖 Generated with Claude Code

- `cut -d '=' -f2`가 base64 패딩의 `=`를 구분자로 인식하여 키 데이터가 잘리는 문제 수정 → `sed` 사용
- fastlane 실행 시 IPA_PATH가 상대경로로 전달되어 경로를 찾지 못하는 문제 수정 → 절대경로 사용
- env 서브모듈 최신화

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 10, 2026 02:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes production .env.prod parsing for base64-padded values and ensures Fastlane receives an absolute IPA path so iOS deploy targets can locate the built artifact reliably.

Changes:

  • Replace cut -d '=' -f2 with sed for base64-like env values to avoid truncating = padding.
  • Pass IPA_PATH as an absolute path when invoking Fastlane from ios/.
  • Update the git.environment-variables submodule commit.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
git.environment-variables Bumps env submodule to a newer commit.
Makefile Fixes .env.prod parsing for base64 values and makes IPA path absolute for Fastlane runs.

Makefile Outdated
export ASC_KEY_CONTENT=$$(grep '^ASC_KEY_BASE64=' .env.prod | cut -d '=' -f2 | base64 --decode); \
export IPA_PATH=$$(ls build/ios/ipa/*.ipa 2>/dev/null | head -1); \
export ASC_KEY_CONTENT=$$(grep '^ASC_KEY_BASE64=' .env.prod | sed 's/^ASC_KEY_BASE64=//' | base64 --decode); \
export IPA_PATH=$$(pwd)/$$(ls build/ios/ipa/*.ipa 2>/dev/null | head -1); \
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

ls ... | head -1 can produce an empty string when no IPA exists; with the current concatenation this sets IPA_PATH to a directory path like /abs/repo/, which can lead Fastlane to fail in a confusing way or read the wrong path. Consider capturing the IPA path first, erroring out if empty, and only then prefixing with the absolute path (apply the same guard to the deploy-ios-appstore target as well).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

✅ Resolved in dbf6c0e

변경 내용:

  • IPA 파일 경로를 먼저 변수에 캡처 후, 빈 문자열이면 에러 메시지와 함께 exit
  • deploy-ios-testflight, deploy-ios-appstore 양쪽 모두 동일하게 적용

Makefile Outdated
Comment on lines 336 to 337
@export ASC_KEY_ID=$$(grep '^ASC_KEY_ID=' .env.prod | cut -d '=' -f2); \
export ASC_ISSUER_ID=$$(grep '^ASC_ISSUER_ID=' .env.prod | cut -d '=' -f2); \
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

_load-asc-env was updated to use sed to avoid =-related truncation, but these exports still use cut. Even if these fields usually don't contain =, the mixed parsing approaches increase the chance of future regressions. Suggest standardizing on the same parsing approach (e.g., sed 's/^...=//') across all ASC env reads so the logic is consistent.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

✅ Resolved in dbf6c0e

변경 내용:

  • deploy-ios-testflight, deploy-ios-appstoreASC_KEY_ID, ASC_ISSUER_ID 파싱을 cut -d '=' -f2에서 sed로 통일
  • _load-asc-env, deploy-ios-testflight, deploy-ios-appstore 3곳 모두 동일한 파싱 방식 사용

- IPA 경로 빈 문자열 가드 추가 (testflight, appstore 모두)
- ASC_KEY_ID, ASC_ISSUER_ID 파싱도 sed로 통일

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hyejj19 hyejj19 merged commit cba74bb into main Feb 10, 2026
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.

2 participants