From 597dae9243e5aa34f4f38bd185de6ab460620822 Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Thu, 30 Jul 2020 21:04:38 +0300 Subject: [PATCH] Create postinstall script Run ios commands only on Darwin (Fixes: #244) --- package.json | 2 +- scripts/postinstall | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 scripts/postinstall diff --git a/package.json b/package.json index 2fbf76fc..f85852b6 100755 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { - "postinstall": "cd ios && pod install && cd ../ && npx jetify", + "postinstall": "./scripts/postinstall", "android": "react-native run-android", "ios": "react-native run-ios --scheme hamagen", "ios-qa": "react-native run-ios --scheme hamagen-qa", diff --git a/scripts/postinstall b/scripts/postinstall new file mode 100755 index 00000000..7bec6cce --- /dev/null +++ b/scripts/postinstall @@ -0,0 +1,8 @@ +#/bin/sh +case "`uname`" in + Darwin* ) + cd ios && pod install && cd ../ + ;; +esac + +npx jetify