Merge pull request #81 from mapbox/new-arch-binary
restore node-pre-gyp binary publishing
This commit is contained in:
@@ -12,14 +12,14 @@ matrix:
|
||||
|
||||
env:
|
||||
global:
|
||||
- NODE_NVM_VERSION: "0.10"
|
||||
- NODE_VERSION: "0.10.35"
|
||||
- LD_LIBRARY_PATH: "/usr/local/lib"
|
||||
- secure: jkwZnKr5dcM9MQ6mOytnp6FHkbydSfa1L8d4jFp4v4K6Ee/iQh1YIq9c/J1zC0WLyuGokVGaijkKr6CW4nGZ5H8ygBtPo09imnRyH8X0bO5mEjl+KhbpdFqkXVLerpnAGMO7D6+6BtWJlK5uTDWhpeS7YayB3YfETVkllf4n6F8=
|
||||
- secure: ZBiq+KPVM72MF0rtvpui5l7curGXckz4Pefc1L04U6dd/MPa22StvCgXBG7DKhLwI5OgHE1da769asQ3rub/pDOonxAi7fHo3+r/ocbSBZeeaj+p5i5wavppOzD27gCLrpOnSQBk0DfoD+xOM8ZCfIttBbOBMRZ1dpWFG98bJ4c=
|
||||
|
||||
before_install:
|
||||
- ./scripts/install_nvm.sh
|
||||
- cd ./vendor/mbgl && source ./scripts/local_mason.sh && cd ../../
|
||||
- source ./scripts/install_node.sh
|
||||
- source ./vendor/mbgl/scripts/travis_helper.sh
|
||||
- source ./vendor/mbgl/scripts/flags.sh
|
||||
- source ./vendor/mbgl/scripts/travis_before_install.sh
|
||||
|
||||
4
Makefile
4
Makefile
@@ -30,14 +30,14 @@ global: build
|
||||
|
||||
.PHONY: build
|
||||
build: build/Makefile
|
||||
@node-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
@node-pre-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
|
||||
vendor/mbgl:
|
||||
git submodule update --init
|
||||
|
||||
.PHONY: build/Makefile
|
||||
build/Makefile: $(MBGL)/config/$(HOST).gypi
|
||||
@node-gyp configure --clang -- \
|
||||
@node-pre-gyp configure --clang -- \
|
||||
-Dmbgl=$(MBGL) \
|
||||
-Dhost=$(HOST) \
|
||||
-I$(MBGL)/config/$(HOST).gypi \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'targets': [
|
||||
{ 'target_name': 'mbgl',
|
||||
{ 'target_name': '<(module_name)',
|
||||
'dependencies': [
|
||||
'./<(mbgl)/mbgl.gyp:core',
|
||||
'./<(mbgl)/mbgl.gyp:platform-<(platform_lib)',
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
{ 'target_name': 'action_after_build',
|
||||
'type': 'none',
|
||||
'dependencies': [ 'mbgl' ],
|
||||
'dependencies': [ '<(module_name)' ],
|
||||
'copies': [
|
||||
{
|
||||
'files': [ '<(PRODUCT_DIR)/mbgl.node' ],
|
||||
'destination': 'lib'
|
||||
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
|
||||
'destination': '<(module_path)'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
15
package.json
15
package.json
@@ -18,8 +18,12 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"nan": "^1.4.1"
|
||||
"nan": "^1.4.1",
|
||||
"node-pre-gyp": "^0.6.4"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"node-pre-gyp"
|
||||
],
|
||||
"devDependencies": {
|
||||
"aws-sdk": "^2.1.9",
|
||||
"mapbox-gl-test-suite": "git://github.com/mapbox/mapbox-gl-test-suite#master",
|
||||
@@ -31,5 +35,12 @@
|
||||
"install": "make",
|
||||
"test": "make test"
|
||||
},
|
||||
"gypfile": true
|
||||
"gypfile": true,
|
||||
"binary": {
|
||||
"module_name": "mbgl",
|
||||
"module_path": "./lib/",
|
||||
"host": "https://mapbox-node-binary.s3.amazonaws.com",
|
||||
"remote_path": "./{name}/v{version}",
|
||||
"package_name": "{node_abi}-{platform}-{arch}.tar.gz"
|
||||
}
|
||||
}
|
||||
|
||||
9
scripts/install_node.sh
Executable file
9
scripts/install_node.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
mason install node $NODE_VERSION
|
||||
export PATH="`mason prefix node $NODE_VERSION`/bin":"$PATH"
|
||||
node --version
|
||||
npm --version
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
git clone git@github.com:creationix/nvm.git ../.nvm
|
||||
source ../.nvm/nvm.sh
|
||||
nvm install $NODE_NVM_VERSION
|
||||
nvm use $NODE_NVM_VERSION
|
||||
node --version
|
||||
npm --version
|
||||
Reference in New Issue
Block a user