Skip to content

Commit

Permalink
output zip path not folder
Browse files Browse the repository at this point in the history
  • Loading branch information
CyonAlexRDX committed Feb 16, 2024
1 parent c69fedd commit 3d5b01c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if useLocalFramework {
)
} else {
let releaseTag = "0.1.0"
let releaseChecksum = "dc2a4a457cf320682e61116ded238c00511d20d179aec6fc2d710c22f4b07a49"
let releaseChecksum = "90718602caa3f9cf7d1fd78b9e2d02c28f350731df421ba0ea701ed659c46967"
binaryTarget = .binaryTarget(
name: sargonBinaryTargetName,
url:
Expand Down
9 changes: 5 additions & 4 deletions scripts/ios/build-sargon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,24 @@ build_xcframework() {
# Builds an XCFramework
echo "📦 Generating XCFramework"
rm -rf target/ios # Delete the output folder so we can regenerate it
OUTDIR="target/ios/lib$1-rs.xcframework"
XCFRAME_PATH="target/ios/lib$1-rs.xcframework"
XCFRAME_ZIP_PATH=$XCFRAME_PATH.zip"
xcodebuild -create-xcframework \
-library target/aarch64-apple-ios/release/lib$1.a -headers target/uniffi-xcframework-staging \
-library target/ios-simulator-fat/release/lib$1.a -headers target/uniffi-xcframework-staging \
-output $OUTDIR
if $release; then
echo "📦 ('release' is true) Building xcframework archive"
zip -r target/ios/lib$1-rs.xcframework.zip target/ios/lib$1-rs.xcframework
checksum=$(swift package compute-checksum target/ios/lib$1-rs.xcframework.zip)
zip -r $XCFRAME_ZIP_PATH $XCFRAME_PATH
checksum=$(swift package compute-checksum $XCFRAME_ZIP_PATH)
version=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name=="sargon") .version')
sed -i "" -E "s/(let releaseTag = \")[^\"]+(\")/\1$version\2/g" Package.swift
sed -i "" -E "s/(let releaseChecksum = \")[^\"]+(\")/\1$checksum\2/g" Package.swift
else
echo "📦 'release' is false"
fi
echo "$OUTDIR"
echo "$XCFRAME_ZIP_PATH"
}
Expand Down

0 comments on commit 3d5b01c

Please sign in to comment.