From 6fef7d1d71a1224914d0716a14b56ad4f4d032e6 Mon Sep 17 00:00:00 2001 From: Mike Guerrette Date: Wed, 17 Jul 2019 16:45:27 -0400 Subject: [PATCH] Remove mapbox sdk preinstall download --- package.json | 2 - ...download-mapbox-gl-native-ios-if-on-mac.js | 18 --------- scripts/download-mapbox-gl-native-ios.sh | 37 ------------------- 3 files changed, 57 deletions(-) delete mode 100644 scripts/download-mapbox-gl-native-ios-if-on-mac.js delete mode 100755 scripts/download-mapbox-gl-native-ios.sh diff --git a/package.json b/package.json index b9b8fb5f4..4ea95061a 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,8 @@ "url": "https://github.com/react-native-mapbox-gl/maps" }, "scripts": { - "fetch:ios:sdk": "node ./scripts/download-mapbox-gl-native-ios-if-on-mac.js 5.0.0", "fetch:style:spec": ". ./scripts/download-style-spec.sh", "generate": "node ./scripts/autogenerate", - "preinstall": "npm run fetch:ios:sdk", "test": "npm run lint && npm run unittest", "unittest": "jest --coverage --verbose", "unittest:single": "jest --testNamePattern", diff --git a/scripts/download-mapbox-gl-native-ios-if-on-mac.js b/scripts/download-mapbox-gl-native-ios-if-on-mac.js deleted file mode 100644 index eb8acc74d..000000000 --- a/scripts/download-mapbox-gl-native-ios-if-on-mac.js +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -var version = process.argv[2]; -var path = require('path'); - -// only download iOS SDK if on Mac OS -if (process.platform === 'darwin') { - var exec = require('child_process').exec; - var cmd = `"${path.join(__dirname, 'download-mapbox-gl-native-ios.sh')}" ${version}`; - exec(cmd, function(error, stdout, stderr) { - if (error) { - console.error(error); - return; - } - console.log(stdout); - console.log(stderr); - }); -} diff --git a/scripts/download-mapbox-gl-native-ios.sh b/scripts/download-mapbox-gl-native-ios.sh deleted file mode 100755 index 03f3e3f37..000000000 --- a/scripts/download-mapbox-gl-native-ios.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -cd ios/ - -VERSION=$1 -if type /usr/libexec/PlistBuddy &> /dev/null; then - CURRENT_VERSION=$(/usr/libexec/PlistBuddy -c "Print :MGLSemanticVersionString" Mapbox.framework/Info.plist) -else - CURRENT_VERSION=$(cat .framework_version) -fi - -if [ "$VERSION" == "$CURRENT_VERSION" ]; then - echo "The newest version is already installed. Exiting." - exit 0 -fi - -echo "Downloading Mapbox GL iOS $VERSION, this may take a minute." - -if ! which curl > /dev/null; then echo "curl command not found. Please install curl"; exit 1; fi; -if ! which unzip > /dev/null; then echo "unzip command not found. Please install unzip"; exit 1; fi; - -if [ -d ./Mapbox.framework ]; then - echo "Old Mapbox.framework found. Removing it and installing a $VERSION" - rm -rf ./Mapbox.framework -fi - -curl -sS https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-$VERSION-dynamic.zip > temp.zip -unzip -o temp.zip -d temp -mv temp/dynamic/Mapbox.framework ./Mapbox.framework -rm -r temp -rm temp.zip - -if ! [ -d ./Mapbox.framework ]; then - echo "Mapbox.framework not found. Please reinstall react-native-mapbox-gl"; exit 1; -fi; - -echo "$VERSION" > .framework_version