Update version to 1.1.8 and fix version code to 9 in Android build files
This commit is contained in:
162
build-ios.sh
162
build-ios.sh
@@ -196,7 +196,7 @@ start_build_process() {
|
||||
echo -e "${YELLOW}디버그 빌드 시작...${NC}"
|
||||
|
||||
# 기본적인 빌드 (IPA 없이)
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Debug -derivedDataPath build
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Debug -derivedDataPath build -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}디버그 빌드 실패. 오류를 확인하세요.${NC}"
|
||||
@@ -217,64 +217,44 @@ start_build_process() {
|
||||
if [[ "$CREATE_DEBUG_IPA" == "y" || "$CREATE_DEBUG_IPA" == "Y" ]]; then
|
||||
echo -e "${YELLOW}디버그용 IPA 파일 생성 중...${NC}"
|
||||
|
||||
# exportOptions.plist 파일 생성
|
||||
cat > exportOptionsDebug.plist << EOF
|
||||
# 아카이브 생성
|
||||
xcodebuild archive -workspace App.xcworkspace -scheme App -configuration Debug -archivePath build/App.xcarchive -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}아카이브 생성 실패. 오류를 확인하세요.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# IPA Export (기본 경로 사용)
|
||||
EXPORT_OPTIONS_PLIST_PATH="build/DebugExportOptions.plist"
|
||||
cat > "$EXPORT_OPTIONS_PLIST_PATH" <<EOL
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>development</string>
|
||||
<string>development</string>
|
||||
<key>teamID</key>
|
||||
<string>${TEAM_ID}</string>
|
||||
<key>compileBitcode</key>
|
||||
<false/>
|
||||
<string>$TEAM_ID</string>
|
||||
<key>signingStyle</key>
|
||||
<string>automatic</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
# 아카이브 생성
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Debug clean archive -archivePath "build/App-Debug.xcarchive" -allowProvisioningUpdates
|
||||
|
||||
EOL
|
||||
xcodebuild -exportArchive -archivePath build/App.xcarchive -exportPath build/debug_ipa -exportOptionsPlist "$EXPORT_OPTIONS_PLIST_PATH" -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}아카이브 생성 실패. 오류를 확인하세요.${NC}"
|
||||
rm exportOptionsDebug.plist
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# IPA 파일 생성
|
||||
xcodebuild -exportArchive -archivePath "build/App-Debug.xcarchive" -exportOptionsPlist exportOptionsDebug.plist -exportPath "build/export-debug" -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
rm exportOptionsDebug.plist
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm exportOptionsDebug.plist
|
||||
|
||||
DEBUG_IPA_PATH="build/export-debug/App.ipa"
|
||||
DEBUG_DEST_PATH="$HOME/Dev/zellyy-finance-ios-debug.ipa"
|
||||
|
||||
if [ -f "$DEBUG_IPA_PATH" ]; then
|
||||
echo -e "${GREEN}디버그용 IPA 파일 생성 성공!${NC}"
|
||||
echo -e "IPA 파일 위치: $(pwd)/$DEBUG_IPA_PATH"
|
||||
|
||||
# 홈 디렉토리로 IPA 복사
|
||||
cp "$DEBUG_IPA_PATH" "$DEBUG_DEST_PATH"
|
||||
echo -e "${GREEN}IPA를 홈 디렉토리에 복사했습니다: $DEBUG_DEST_PATH${NC}"
|
||||
|
||||
echo -e "${YELLOW}다음 방법으로 다른 기기에 설치할 수 있습니다:${NC}"
|
||||
echo "1. Apple Configurator 2 앱 사용"
|
||||
echo "2. 기기 등록 및 프로비저닝 프로파일이 있는 경우 iTunes로 설치"
|
||||
echo "3. TestFlight를 통한 배포 (App Store Connect에 업로드 필요)"
|
||||
echo -e "${RED}디버그 IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
echo -e "${YELLOW}Apple 개발자 계정 정보(팀 ID: $TEAM_ID)가 정확한지, Xcode에서 서명 설정이 완료되었는지 확인하세요.${NC}"
|
||||
echo -e "${GREEN}Xcode 빌드는 완료되었을 수 있습니다. Xcode에서 직접 확인하거나 실행해 보세요.${NC}"
|
||||
else
|
||||
echo -e "${RED}IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
echo -e "${GREEN}디버그 IPA 파일 생성 완료: build/debug_ipa/App.ipa${NC}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "${YELLOW}개발자 등록이 필요하여 IPA 파일 생성 단계를 건너뜁니다.${NC}"
|
||||
echo -e "${YELLOW}시뮬레이터에서 앱을 테스트하거나 Apple 개발자 계정을 등록하세요.${NC}"
|
||||
echo -e "${YELLOW}개발자 등록이 필요하여 IPA 파일 생성 단계를 건너<0xEB><0x9B><0x81>니다.${NC}"
|
||||
echo -e "${YELLOW}앱을 기기에서 테스트하려면 Xcode에서 '${WORKSPACE_DIR}/ios/App/App.xcworkspace' 파일을 열고,${NC}"
|
||||
echo -e "${YELLOW}USB로 연결된 기기를 선택한 후 직접 빌드 및 실행하세요.${NC}"
|
||||
fi
|
||||
|
||||
elif [ "$BUILD_TYPE" = "release" ]; then
|
||||
@@ -282,7 +262,7 @@ EOF
|
||||
echo -e "${YELLOW}릴리즈 빌드 시작...${NC}"
|
||||
|
||||
# 기본 Xcode 빌드
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -derivedDataPath build
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -derivedDataPath build -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}릴리즈 빌드 실패. 오류를 확인하세요.${NC}"
|
||||
@@ -304,75 +284,71 @@ EOF
|
||||
echo -e "${YELLOW}App Store 배포용 아카이브 생성 중...${NC}"
|
||||
|
||||
# 아카이브 생성
|
||||
xcodebuild -workspace App.xcworkspace -scheme App -configuration Release clean archive -archivePath "build/App.xcarchive" -allowProvisioningUpdates
|
||||
xcodebuild archive -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}아카이브 생성 실패. 오류를 확인하세요.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}아카이브 생성 성공!${NC}"
|
||||
echo -e "아카이브 위치: $(pwd)/build/App.xcarchive"
|
||||
# IPA Export
|
||||
RELEASE_DIR="$WORKSPACE_DIR/release"
|
||||
EXPORT_OPTIONS_PLIST_PATH="build/ReleaseExportOptions.plist"
|
||||
|
||||
# exportOptions.plist 파일 생성
|
||||
cat > exportOptions.plist << EOF
|
||||
# release 디렉토리 생성
|
||||
mkdir -p "$RELEASE_DIR"
|
||||
|
||||
cat > "$EXPORT_OPTIONS_PLIST_PATH" <<EOL
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>method</key>
|
||||
<string>app-store</string>
|
||||
<string>app-store</string>
|
||||
<key>teamID</key>
|
||||
<string>${TEAM_ID}</string>
|
||||
<string>$TEAM_ID</string>
|
||||
<key>signingStyle</key>
|
||||
<string>automatic</string>
|
||||
<key>uploadBitcode</key>
|
||||
<false/>
|
||||
<true/>
|
||||
<key>uploadSymbols</key>
|
||||
<true/>
|
||||
<key>provisioningProfiles</key>
|
||||
<dict>
|
||||
<key>com.lovable.zellyfinance</key>
|
||||
<string>Zellyy Finance App Store</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
# IPA 파일 생성
|
||||
echo -e "${YELLOW}IPA 파일 생성 중...${NC}"
|
||||
xcodebuild -exportArchive -archivePath "build/App.xcarchive" -exportOptionsPlist exportOptions.plist -exportPath "build/export" -allowProvisioningUpdates
|
||||
|
||||
EOL
|
||||
# exportPath는 디렉토리만 지정
|
||||
xcodebuild -exportArchive -archivePath build/App.xcarchive -exportPath "$RELEASE_DIR" -exportOptionsPlist "$EXPORT_OPTIONS_PLIST_PATH" -allowProvisioningUpdates
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${RED}IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
rm exportOptions.plist
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm exportOptions.plist
|
||||
|
||||
IPA_PATH="build/export/App.ipa"
|
||||
DEST_PATH="$HOME/Dev/zellyy-finance-ios.ipa"
|
||||
|
||||
if [ -f "$IPA_PATH" ]; then
|
||||
echo -e "${GREEN}IPA 파일 생성 성공!${NC}"
|
||||
echo -e "IPA 파일 위치: $(pwd)/$IPA_PATH"
|
||||
|
||||
# 홈 디렉토리로 IPA 복사
|
||||
cp "$IPA_PATH" "$DEST_PATH"
|
||||
echo -e "${GREEN}IPA를 홈 디렉토리에 복사했습니다: $DEST_PATH${NC}"
|
||||
|
||||
echo -e "${YELLOW}다음 단계:${NC}"
|
||||
echo "1. App Store Connect에 로그인: https://appstoreconnect.apple.com"
|
||||
echo "2. 앱 > 젤리의 적자탈출 > iOS 앱 > 빌드 섹션으로 이동"
|
||||
echo "3. Transporter 앱을 사용하여 IPA 파일 업로드: $DEST_PATH"
|
||||
echo "4. 검토 과정이 완료될 때까지 기다리기 (보통 몇 시간에서 24시간 소요)"
|
||||
echo -e "${RED}릴리즈 IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
echo -e "${YELLOW}Apple 개발자 계정 정보(팀 ID: $TEAM_ID)가 정확한지, Xcode에서 서명 및 배포 설정이 완료되었는지 확인하세요.${NC}"
|
||||
echo -e "${GREEN}Xcode 빌드는 완료되었을 수 있습니다. Xcode에서 직접 확인하거나 실행해 보세요.${NC}"
|
||||
else
|
||||
echo -e "${RED}IPA 파일 생성 실패. 오류를 확인하세요.${NC}"
|
||||
exit 1
|
||||
# 버전 정보 읽기 (스크립트 상단에서 이미 읽었지만 명확성을 위해 다시 확인)
|
||||
CURRENT_VERSION_NAME=$(grep "VERSION_NAME" "$PROPERTIES_FILE" | cut -d'=' -f2)
|
||||
CURRENT_BUILD_NUMBER=$(grep "BUILD_NUMBER" "$PROPERTIES_FILE" | cut -d'=' -f2)
|
||||
|
||||
# IPA 파일 이름 변경 (기본 이름은 App.ipa 로 가정)
|
||||
DEFAULT_IPA_NAME="App.ipa"
|
||||
TARGET_IPA_NAME="App-v${CURRENT_VERSION_NAME}-b${CURRENT_BUILD_NUMBER}.ipa"
|
||||
|
||||
if [ -f "$RELEASE_DIR/$DEFAULT_IPA_NAME" ]; then
|
||||
mv "$RELEASE_DIR/$DEFAULT_IPA_NAME" "$RELEASE_DIR/$TARGET_IPA_NAME"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}릴리즈 IPA 파일 생성 완료:${NC} ${BOLD}${RELEASE_DIR}/${TARGET_IPA_NAME}${NC}"
|
||||
else
|
||||
echo -e "${RED}IPA 파일 이름 변경 실패: ${RELEASE_DIR}/${DEFAULT_IPA_NAME} -> ${TARGET_IPA_NAME}${NC}"
|
||||
echo -e "${YELLOW}생성된 IPA 파일은 ${RELEASE_DIR}/${DEFAULT_IPA_NAME} 에 있습니다.${NC}"
|
||||
fi
|
||||
else
|
||||
echo -e "${RED}예상된 IPA 파일(${DEFAULT_IPA_NAME})을 찾을 수 없습니다. Export 과정을 확인하세요.${NC}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "${YELLOW}개발자 등록이 필요하여 아카이브 생성 단계를 건너뜁니다.${NC}"
|
||||
echo -e "${YELLOW}시뮬레이터에서 앱을 테스트하거나 Apple 개발자 계정을 등록하세요.${NC}"
|
||||
echo -e "${YELLOW}개발자 등록이 필요하여 아카이브 생성 단계를 건너<0xEB><0x9B><0x81>니다.${NC}"
|
||||
echo -e "${YELLOW}앱을 App Store에 제출하거나 Ad Hoc 배포를 하려면 유료 Apple 개발자 계정이 필요합니다.${NC}"
|
||||
echo -e "${YELLOW}개발 테스트는 Xcode에서 '${WORKSPACE_DIR}/ios/App/App.xcworkspace' 파일을 열고 직접 진행할 수 있습니다.${NC}"
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user