Skip to content
This repository has been archived by the owner on Oct 6, 2024. It is now read-only.

Commit

Permalink
include BTFuseTestTools in releases
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Dec 25, 2023
1 parent aa67d9b commit 21e38b0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 2 additions & 2 deletions BTFuse/BTFuse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/../echo/echo/\"",
"$(BUILT_PRODUCTS_DIR)/openssl/include",
"\"$(SRCROOT)/../../plugins/echo/ios/echo\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
Expand All @@ -775,8 +775,8 @@
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS = (
"\"$(SRCROOT)/../echo/echo/\"",
"$(BUILT_PRODUCTS_DIR)/openssl/include",
"\"$(SRCROOT)/../../plugins/echo/ios/echo\"",
);
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = com.breautek.fuse.test;
PRODUCT_BUNDLE_IDENTIFIER = com.breautek.fuse.testtools;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -388,7 +388,7 @@
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
PRODUCT_BUNDLE_IDENTIFIER = com.breautek.fuse.test;
PRODUCT_BUNDLE_IDENTIFIER = com.breautek.fuse.testtools;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down
26 changes: 26 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,38 +50,64 @@ xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Re
assertLastCall
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Debug -destination "generic/platform=iOS Simulator" clean
assertLastCall
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Release -destination "generic/platform=iOS" clean
assertLastCall
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Debug -destination "generic/platform=iOS Simulator" clean
assertLastCall

echo "Building iOS framework..."
# Now build the iOS platform target in Release mode. We will continue to use Debug mode for iOS Simulator targets.
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Release -destination "generic/platform=iOS" build
assertLastCall
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Release -destination "generic/platform=iOS" build
assertLastCall
echo "Building iOS Simulator framework..."
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Debug -destination "generic/platform=iOS Simulator" build
assertLastCall
xcodebuild -quiet -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Debug -destination "generic/platform=iOS Simulator" build
assertLastCall

iosBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Release -sdk iphoneos -showBuildSettings | grep "CONFIGURATION_BUILD_DIR")" | cut -d'=' -f2 | xargs)
simBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuse -configuration Debug -sdk iphonesimulator -showBuildSettings | grep "CONFIGURATION_BUILD_DIR")" | cut -d'=' -f2 | xargs)
iosTestToolsBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Release -sdk iphoneos -showBuildSettings | grep "CONFIGURATION_BUILD_DIR")" | cut -d'=' -f2 | xargs)
simTestToolsBuild=$(echo "$(xcodebuild -workspace BTFuse.xcworkspace -scheme BTFuseTestTools -configuration Debug -sdk iphonesimulator -showBuildSettings | grep "CONFIGURATION_BUILD_DIR")" | cut -d'=' -f2 | xargs)

echo "Signing iOS build..."
codesign -s $BTFUSE_CODESIGN_IDENTITY --deep $iosBuild/BTFuse.framework
assertLastCall
codesign -s $BTFUSE_CODESIGN_IDENTITY --deep $iosTestToolsBuild/BTFuseTestTools.framework
assertLastCall

echo "Verifying iOS Build"
codesign -dvvvv $iosBuild/BTFuse.framework
assertLastCall
codesign -dvvvv $iosTestToolsBuild/BTFuseTestTools.framework
assertLastCall

cp -r $iosBuild/BTFuse.framework.dSYM ./dist/
cp -r $iosTestToolsBuild/BTFuseTestTools.framework.dSYM ./dist

echo "Packing XCFramework..."
xcodebuild -create-xcframework \
-framework $iosBuild/BTFuse.framework \
-debug-symbols $iosBuild/BTFuse.framework.dSYM \
-framework $simBuild/BTFuse.framework \
-output dist/BTFuse.xcframework
assertLastCall
xcodebuild -create-xcframework \
-framework $iosTestToolsBuild/BTFuseTestTools.framework \
-debug-symbols $iosTestToolsBuild/BTFuseTestTools.framework.dSYM \
-framework $simTestToolsBuild/BTFuseTestTools.framework \
-output dist/BTFuseTestTools.xcframework
assertLastCall

spushd dist
zip -r BTFuse.xcframework.zip BTFuse.xcframework > /dev/null
zip -r BTFuse.framework.dSYM.zip BTFuse.framework.dSYM > /dev/null
zip -r BTFuseTestTools.xcframework.zip BTFuseTestTools.xcframework > /dev/null
zip -r BTFuseTestTools.framework.dSYM.zip BTFuseTestTools.framework.dSYM > /dev/null
sha1_compute BTFuse.xcframework.zip
sha1_compute BTFuse.framework.dSYM.zip
sha1_compute BTFuseTestTools.xcframework.zip
sha1_compute BTFuseTestTools.framework.dSYM.zip
spopd

0 comments on commit 21e38b0

Please sign in to comment.