Skip to content

Commit

Permalink
bump purchases version, update purchases-hybrid-common download script
Browse files Browse the repository at this point in the history
  • Loading branch information
aboedo committed May 14, 2020
1 parent 556495b commit 6e2a008
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1. Update to the latest SDK versions in purchases_flutter.podspec and build.gradle.
1. Run `./scripts/download-purchases-common.sh 1.0.11` (change version to latest)
1. Run `./scripts/download-purchases-common.sh 1.0.14` (change version to latest)
1. Run `flutter format`
1. Update versions in VERSIONS.md.
1. Update version in pubspec.yaml, purchases_flutter.podspec and android/build.gradle.
Expand Down
2 changes: 1 addition & 1 deletion ios/purchases_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'Purchases', '~> 3.3.0'
s.dependency 'Purchases', '~> 3.3.1'

s.ios.deployment_target = '9.0'
end
Expand Down
9 changes: 7 additions & 2 deletions scripts/download-purchases-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ if [[ -d ios/Classes/Common ]]; then
rm -rf ios/Classes/Common
fi

if [[ -d ios/Classes/PurchasesHybridCommon ]]; then
echo "Old iOS classes found. Removing them and installing version $VERSION"
rm -rf ios/Classes/PurchasesHybridCommon
fi

if [[ -d android/src/main/java/com/revenuecat/purchases/common ]]; then
echo "Old Android classes found. Removing them and installing version $VERSION"
rm -rf android/src/main/java/com/revenuecat/purchases/common
Expand All @@ -32,12 +37,12 @@ curl -sSL ${URL} > tempCommon.zip
mkdir -p tempCommon
unzip -o tempCommon.zip -d tempCommon
ls tempCommon
mv tempCommon/purchases-hybrid-common-$VERSION/ios/ ios/Classes/Common
mv tempCommon/purchases-hybrid-common-$VERSION/ios/PurchasesHybridCommon ios/Classes/PurchasesHybridCommon
mv tempCommon/purchases-hybrid-common-$VERSION/android/common/src/main/java/com/revenuecat/purchases/common/ android/src/main/java/com/revenuecat/purchases/common
rm -r tempCommon
rm tempCommon.zip

if ! [[ -d ios/Classes/Common ]]; then
if ! [[ -d ios/Classes/PurchasesHybridCommon ]]; then
echo "Common iOS files not found. Please reinstall purchases-flutter"; exit 1;
fi;

Expand Down

0 comments on commit 6e2a008

Please sign in to comment.