[node] Build and publish for node 6.x, 8.x, and 10.x

Note that we're still only testing the 6.x ABI (48).
This commit is contained in:
John Firebaugh
2018-06-15 16:18:33 -07:00
parent ec05ee41d1
commit 37e71666d8
5 changed files with 37 additions and 30 deletions

View File

@@ -1,17 +0,0 @@
#!/bin/bash
set -e
set -o pipefail
PACKAGE_JSON_VERSION=`node -e "console.log(require('./package.json').version)"`
if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" == true ]]; then
if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then
./node_modules/.bin/node-pre-gyp package publish info
elif [[ "${BUILDTYPE}" == "Debug" ]]; then
./node_modules/.bin/node-pre-gyp package publish info --debug
else
echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE"
exit 1
fi
fi

View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -e
set -o pipefail
PACKAGE_JSON_VERSION=`node -e "console.log(require('./package.json').version)"`
if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" == true ]]; then
# Changes to the version targets here should happen in tandem with updates to the
# EXCLUDE_NODE_ABIS property in cmake/node.cmake and the "node" engines property in
# package.json.
for TARGET in 6.0.0 8.0.0 10.0.0; do
if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then
./node_modules/.bin/node-pre-gyp package publish info --target="${TARGET}"
elif [[ "${BUILDTYPE}" == "Debug" ]]; then
./node_modules/.bin/node-pre-gyp package publish info --target="${TARGET}" --debug
else
echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE"
exit 1
fi
done
fi