From e653c77faaab4e0fe64bf590db6653566323e671 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Wed, 24 Nov 2021 10:41:13 +0100 Subject: [PATCH] Create SwiftPM binaries for both dynamic/static --- create-swiftpm-binaries.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/create-swiftpm-binaries.sh b/create-swiftpm-binaries.sh index 6ff9ebf..c5959c6 100755 --- a/create-swiftpm-binaries.sh +++ b/create-swiftpm-binaries.sh @@ -1,12 +1,15 @@ #!/bin/bash +if [ $# == 0 ]; then + echo "Usage: `basename $0` static|dynamic" + exit 1 +fi VERSION="1.1.1l" TARGETS="ios-sim-cross-x86_64 ios-sim-cross-arm64 ios64-cross-arm64 ios64-cross-arm64e macos64-x86_64 macos64-arm64 mac-catalyst-x86_64 mac-catalyst-arm64" FRAMEWORK="openssl.xcframework" FRAMEWORK_ZIP="openssl.xcframework.zip" FRAMEWORK_DIR="swiftpm/$VERSION" -./build-libssl.sh --version="$VERSION" --targets="$TARGETS" -./create-openssl-framework.sh dynamic +./create-openssl-framework.sh $1 ( cd frameworks && zip -yr $FRAMEWORK_ZIP $FRAMEWORK ) -mkdir -p $FRAMEWORK_DIR -mv frameworks/$FRAMEWORK_ZIP $FRAMEWORK_DIR -swift package compute-checksum $FRAMEWORK_DIR/$FRAMEWORK_ZIP +mkdir -p $FRAMEWORK_DIR/$1 +mv frameworks/$FRAMEWORK_ZIP $FRAMEWORK_DIR/$1 +swift package compute-checksum $FRAMEWORK_DIR/$1/$FRAMEWORK_ZIP