-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a379b7
commit 2a291f3
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
CHECKSUM='' | ||
VERSION='' | ||
|
||
while getopts v:c: flag | ||
do | ||
case "${flag}" in | ||
v) VERSION=${OPTARG};; | ||
c) CHECKSUM=${OPTARG};; | ||
*) error "Unexpected option ${flag}";; | ||
esac | ||
done | ||
|
||
if [ -z $CHECKSUM ]; then | ||
echo "Checksum is required" | ||
fi | ||
|
||
if [ -z $VERSION ]; then | ||
echo "Version is required" | ||
fi | ||
|
||
TEMPLATE=" | ||
// swift-tools-version:5.3 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
import PackageDescription | ||
let package = Package( | ||
name: \"SendBirdSDK\", | ||
platforms: [.iOS(.v10)], | ||
products: [ | ||
.library( | ||
name: \"SendBirdSDK\", | ||
targets: [\"SendBirdSDK\"] | ||
), | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.binaryTarget( | ||
name: \"SendBirdSDK\", | ||
url: \"https://github.com/sendbird/sendbird-ios-framework/releases/download/$VERSION/SendBirdSDK.xcframework.zip\", | ||
checksum: \"$CHECKSUM\" | ||
), | ||
] | ||
)" | ||
|
||
echo -e "$TEMPLATE" > Package.swift |