From 7d3968397247c7466807ee4a5f0f69b95b85d4fd Mon Sep 17 00:00:00 2001 From: PhilKunz Date: Wed, 23 Mar 2016 15:55:07 +0100 Subject: [PATCH] fix doPublish function --- dist/npmts.options.js | 4 +++- ts/npmts.options.ts | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dist/npmts.options.js b/dist/npmts.options.js index b5ff777..d5f29e7 100644 --- a/dist/npmts.options.js +++ b/dist/npmts.options.js @@ -27,7 +27,9 @@ exports.run = function (configArg) { } // handle state of current build exports.isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!") - : plugins.beautylog.info("NOT A RELEASE build! We are not publishing anything!"); + : plugins.beautylog.info("NOT A RELEASE build!"); + exports.isRelease() && exports.doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes coverage and docs when tests succeed!") + : plugins.beautylog.info("We are not publishing anything!"); // handle coveralls config.coveralls ? void (0) : config.coveralls = false; exports.doPublish() ? void (0) : config.coveralls = false; diff --git a/ts/npmts.options.ts b/ts/npmts.options.ts index 530b9d8..47e038a 100644 --- a/ts/npmts.options.ts +++ b/ts/npmts.options.ts @@ -8,7 +8,7 @@ export let isRelease = function():boolean { export let doPublish = function():boolean { return isRelease() - && plugins.smartci.get.subJobNumber() != 1; + && plugins.smartci.get.subJobNumber() == 1; }; export var run = function(configArg){ @@ -32,7 +32,9 @@ export var run = function(configArg){ // handle state of current build isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!") - : plugins.beautylog.info("NOT A RELEASE build! We are not publishing anything!"); + : plugins.beautylog.info("NOT A RELEASE build!"); + isRelease() && doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes coverage and docs when tests succeed!") + : plugins.beautylog.info("We are not publishing anything!"); // handle coveralls config.coveralls ? void(0) : config.coveralls = false;