summaryrefslogtreecommitdiff
path: root/platform/node/scripts/after_success.sh
blob: a5c3c5ec36b11e8f17ef4fa614304be8646fb922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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