From da569c266b663b815b0fa754be59c78904b92fa6 Mon Sep 17 00:00:00 2001 From: Lucas Wojciechowski Date: Wed, 16 Sep 2015 17:26:12 -0700 Subject: [PATCH] [node] enable npm to build mapbox-gl-native package from source This reverts commit 311bf93abe9f815668e8e0a779c87c3eb5c1199d. more explicit require paths in tests --- configure | 11 ++++++-- gyp/version.gypi | 2 +- package.json | 2 +- platform/node/CHANGELOG.md | 5 ++-- platform/node/test/js/map.test.js | 2 +- platform/node/test/render.test.js | 2 +- scripts/build-version.py | 43 +++++++++++++++++++++---------- scripts/main.mk | 6 +++++ 8 files changed, 50 insertions(+), 23 deletions(-) diff --git a/configure b/configure index a14f9c83b..da993492a 100755 --- a/configure +++ b/configure @@ -15,8 +15,15 @@ function abort { >&2 echo -e "\033[1m\033[31m$1\033[0m"; exit 1; } function info { >&2 echo -e "\033[1m\033[33m$1\033[0m"; } function warn { >&2 echo -e "\033[1m\033[33m$1\033[0m"; } -# Install mason -export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" +if [ -d "`pwd`/.git" ]; then + info "This build is within a git repository" + export MASON_DIR="`pwd`/.mason" + export PATH="${MASON_DIR}:${PATH}" +else + info "This build is NOT within a git repository" + which mason || abort "You must install mason to build mapbox-gl-native (https://github.com/mapbox/mason)" + export MASON_DIR="$(dirname $(readlink $(which mason)))" +fi # You can override the function for a particular set of flags by defining a # print_XXX_flags function in your dependencies.sh file diff --git a/gyp/version.gypi b/gyp/version.gypi index 1cc2eb351..4efdd079a 100644 --- a/gyp/version.gypi +++ b/gyp/version.gypi @@ -13,7 +13,7 @@ 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/include/mbgl/util/version.hpp', ], - 'action': ['<@(_inputs)', '<(SHARED_INTERMEDIATE_DIR)', '