From b9475ad772b7b95093703e7ea1def7c7340292c4 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 21 Mar 2016 11:46:34 -0700 Subject: [PATCH] pr feedback --- package.json | 1 + react-native/android/build.gradle | 2 +- scripts/prepublish.sh | 4 ++-- tests/js/realm-tests.js | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 3461b6d1..3b3c0494 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "scripts": { "get-version": "echo $npm_package_version", "set-version": "scripts/set-version.sh", + "get-core-version": "scripts/download-core.sh --version", "jsdoc": "rm -rf docs/output && jsdoc -c docs/conf.json", "lint": "eslint", "test": "scripts/test.sh", diff --git a/react-native/android/build.gradle b/react-native/android/build.gradle index e866147e..8eb8e34f 100644 --- a/react-native/android/build.gradle +++ b/react-native/android/build.gradle @@ -28,7 +28,7 @@ import org.apache.tools.ant.filters.ReplaceTokens // We then copy both the downloaded code and our custom makefiles and headers into third-party-ndk. // After that we build native code from src/main/jni with module path pointing at third-party-ndk. -ext.coreVersion = "$System.env.REALM_CORE_VERSION" +ext.coreVersion = "npm --silent run get-core-version".execute().text.trim() def currentVersion = "npm --silent run get-version".execute().text.trim() def downloadsDir = new File("$projectDir/downloads") def jscDownloadDir = new File("$projectDir/src/main/jni/jsc") diff --git a/scripts/prepublish.sh b/scripts/prepublish.sh index 12b13e20..11d7adc5 100755 --- a/scripts/prepublish.sh +++ b/scripts/prepublish.sh @@ -2,8 +2,8 @@ set -e set -o pipefail -export REALM_CORE_VERSION=`bash ./scripts/download-core.sh --version` -echo "Core Version:$REALM_CORE_VERSION" +export REALM_CORE_VERSION=$(./scripts/download-core.sh --version) +echo "Core Version: $REALM_CORE_VERSION" cd "$(dirname "$0")/.." if [ -n "$REALM_BUILD_ANDROID" ]; then diff --git a/tests/js/realm-tests.js b/tests/js/realm-tests.js index 00e980f6..779c1e15 100644 --- a/tests/js/realm-tests.js +++ b/tests/js/realm-tests.js @@ -301,6 +301,8 @@ module.exports = BaseTest.extend({ // primary key IndexedTypes.primaryKey = 'boolCol'; IndexedTypes.properties = { boolCol: {type: 'bool', indexed: true} } + + // Test this doesn't throw new Realm({schema: [IndexedTypes], path: '5'}); },