Skip to content

Commit

Permalink
Update build_frameworks.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
melekr committed Oct 17, 2024
1 parent c2f782d commit 6b77fce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Scripts/build_frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ PROJECT_DIR="$(dirname "$0")/../Runs"
BUILD_PATH="${PROJECT_DIR}/.build"
WORKFLOW_XC_PATH="${PROJECT_DIR}/frameworks"
WORKFLOW_XC_PATH_STATIC="${PROJECT_DIR}/frameworks/static"
WORKFLOW_XC_PATH_DYLIB="${PROJECT_DIR}/frameworks/dylib"
DERIVED_DATA_PATH="${PROJECT_DIR}/.derivedData"

rm -rf ${BUILD_PATH}
rm -rf ${WORKFLOW_XC_PATH}
rm -rf ${WORKFLOW_XC_PATH_STATIC}
rm -rf ${DERIVED_DATA_PATH}
mkdir ${BUILD_PATH}
mkdir ${WORKFLOW_XC_PATH}
mkdir ${WORKFLOW_XC_PATH_STATIC}
mkdir ${WORKFLOW_XC_PATH_DYLIB}
mkdir ${DERIVED_DATA_PATH}

xcodebuild archive \
Expand Down Expand Up @@ -82,7 +83,7 @@ xcodebuild -create-xcframework \
-archive ${BUILD_PATH}/CrashReporter-macOS-lib.xcarchive -framework CrashReporter.framework \
-archive ${BUILD_PATH}/CrashReporter-tvOS-lib.xcarchive -framework CrashReporter.framework \
-archive ${BUILD_PATH}/CrashReporter-tvOS-Simulator-lib.xcarchive -framework CrashReporter.framework \
-output ${WORKFLOW_XC_PATH}/CrashReporter.xcframework
-output ${WORKFLOW_XC_PATH_DYLIB}/CrashReporter.xcframework

xcodebuild -create-xcframework \
-library ${BUILD_PATH}/CrashReporter-iOS-lib.xcarchive/products/usr/local/lib/libCrashReporter.a -headers ${BUILD_PATH}/CrashReporter-iOS-lib.xcarchive/products/usr/local/lib/include \
Expand All @@ -96,7 +97,7 @@ xcodebuild -create-xcframework \
rm -rf ${BUILD_PATH}
rm -rf ${DERIVED_DATA_PATH}

if [ ! -d "${WORKFLOW_XC_PATH}/CrashReporter.xcframework" ]; then
if [ ! -d "${WORKFLOW_XC_PATH_DYLIB}/CrashReporter.xcframework" ]; then
echo "Error: xcframework failed"
rm -rf ${WORKFLOW_XC_PATH}
exit 1
Expand Down

0 comments on commit 6b77fce

Please sign in to comment.