Skip to content

Commit

Permalink
Update upgrade_lib_bridge.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jerson authored Nov 30, 2020
1 parent 9d4a7dd commit e86703b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion upgrade_lib_bridge.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
#######################################################
# Usage: #
# ./upgrade_bridge_libs.sh #
# #
# or custom version: #
# VERSION=v0.1.1 ./upgrade_bridge_libs.sh #
#######################################################

REPO="jerson/openpgp-mobile"
NAME="gomobile_openpgp"
Expand All @@ -7,6 +14,10 @@ PLATFORMS=("android_aar" "ios_framework")
OUTPUT_DIRS=("android/libs" "ios")
OUTPUT_SUB_DIRS=("" "")

#######################################################
# you shouldn't edit below this line #
#######################################################


echo "Get latest release"
RELEASE_PAYLOAD=$(curl --silent "https://api.github.com/repos/$REPO/releases/latest")
Expand All @@ -15,7 +26,8 @@ get_version() {
echo "$RELEASE_PAYLOAD" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
}

VERSION=$(get_version $REPO)
LATEST_VERSION=$(get_version $REPO)
VERSION=${VERSION:-$LATEST_VERSION}

rm -rf ios/${FRAMEWORK}.framework.zip ios/${FRAMEWORK}.framework

Expand Down

0 comments on commit e86703b

Please sign in to comment.