diff options
Diffstat (limited to 'platform/node/scripts/after_success.sh')
-rwxr-xr-x | platform/node/scripts/after_success.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/platform/node/scripts/after_success.sh b/platform/node/scripts/after_success.sh index a050dbce07..a5c3c5ec36 100755 --- a/platform/node/scripts/after_success.sh +++ b/platform/node/scripts/after_success.sh @@ -3,10 +3,15 @@ set -e set -o pipefail -if [[ "${PUBLISH:-}" == "true" ]]; then - if [[ "${BUILDTYPE}" == "Release" ]]; then +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 - else + 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 |