CocoaPods sample: Check CocoaPods version in build.sh
This commit is contained in:
committed by
Ilya Matveev
parent
9753fa6019
commit
59fd50895c
@@ -5,6 +5,17 @@ DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|||||||
KOTLIN_DIR="$DIR/kotlin-library"
|
KOTLIN_DIR="$DIR/kotlin-library"
|
||||||
IOS_DIR="$DIR/ios-app"
|
IOS_DIR="$DIR/ios-app"
|
||||||
|
|
||||||
|
#Check CocoaPods version.
|
||||||
|
REQUIRED_POD_VERSION="1.6.1"
|
||||||
|
POD_VERSION=`pod --version`
|
||||||
|
EARLIER_VERSION=`echo "$POD_VERSION $REQUIRED_POD_VERSION" | tr " " "\n" | sort -V | head -1`
|
||||||
|
|
||||||
|
if [ "$EARLIER_VERSION" != "$REQUIRED_POD_VERSION" ]; then
|
||||||
|
echo "ERROR: This version of CocoaPods is unsupported. Current version is $POD_VERSION. Minimal required version is $REQUIRED_POD_VERSION."
|
||||||
|
echo "See update instructions at https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Prepare Kotlin/Native project to be consumed by CocoaPods.
|
# Prepare Kotlin/Native project to be consumed by CocoaPods.
|
||||||
"$KOTLIN_DIR/gradlew" -p "$KOTLIN_DIR" podspec
|
"$KOTLIN_DIR/gradlew" -p "$KOTLIN_DIR" podspec
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user