Skip to content

Commit

Permalink
Added automation script
Browse files Browse the repository at this point in the history
  • Loading branch information
intoxicated committed Dec 29, 2021
1 parent 9a379b7 commit 2a291f3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions update.sh
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

0 comments on commit 2a291f3

Please sign in to comment.