now correctly determining release builds
This commit is contained in:
7
dist/index.js
vendored
7
dist/index.js
vendored
@ -4,4 +4,9 @@ console.log("**** starting NPMTS ****");
|
||||
var plugins = require("./npmts.plugins");
|
||||
var promisechain = require("./npmts.promisechain");
|
||||
plugins.beautylog.figletSync("NPMTS");
|
||||
promisechain.run();
|
||||
try {
|
||||
promisechain.run();
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
|
24
dist/npmts.options.js
vendored
24
dist/npmts.options.js
vendored
@ -1,12 +1,19 @@
|
||||
"use strict";
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = require("./npmts.plugins");
|
||||
exports.isRelease = function () {
|
||||
if (plugins.smartci.check.isCi() && plugins.smartci.isTaggedCommit()) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
exports.run = function (configArg) {
|
||||
var done = plugins.Q.defer();
|
||||
var config = configArg;
|
||||
if (typeof config.coveralls === "undefined") {
|
||||
config.coveralls = false;
|
||||
}
|
||||
plugins.beautylog.log("now determining build options");
|
||||
//handle default mode
|
||||
if (config.mode == "default") {
|
||||
config.typings = [
|
||||
"./ts/typings.json"
|
||||
@ -17,11 +24,16 @@ exports.run = function (configArg) {
|
||||
_a
|
||||
);
|
||||
config.test = ["./index.js"];
|
||||
done.resolve(config);
|
||||
}
|
||||
else {
|
||||
done.resolve(config);
|
||||
// handle state of current build
|
||||
exports.isRelease() ? plugins.beautylog.info("All right this is a release build!")
|
||||
: plugins.beautylog.info("not a release build!");
|
||||
// handle coveralls
|
||||
if ((typeof config.coveralls === "undefined" || !exports.isRelease())
|
||||
&& plugins.smartci.get.subJobNumber == 1) {
|
||||
config.coveralls = false;
|
||||
}
|
||||
done.resolve(config);
|
||||
return done.promise;
|
||||
var _a;
|
||||
};
|
||||
|
48
dist/npmts.plugins.js
vendored
48
dist/npmts.plugins.js
vendored
@ -1,28 +1,26 @@
|
||||
"use strict";
|
||||
/// <reference path="./typings/main.d.ts" />
|
||||
var plugins = {
|
||||
beautylog: require("beautylog"),
|
||||
fs: require("fs-extra"),
|
||||
gulp: require("gulp"),
|
||||
g: {
|
||||
coveralls: require("gulp-coveralls"),
|
||||
gFunction: require("gulp-function"),
|
||||
istanbul: require("gulp-istanbul"),
|
||||
jsdoc3: require("gulp-jsdoc3"),
|
||||
mocha: require("gulp-mocha"),
|
||||
sourcemaps: require("gulp-sourcemaps"),
|
||||
typescript: require("gulp-typescript"),
|
||||
typings: require("gulp-typings")
|
||||
},
|
||||
merge2: require("merge2"),
|
||||
projectinfo: require("projectinfo"),
|
||||
sourceMapSupport: require("source-map-support").install(),
|
||||
path: require("path"),
|
||||
Q: require("q"),
|
||||
shelljs: require("shelljs"),
|
||||
smartcli: require("smartcli"),
|
||||
smartenv: require("smartenv"),
|
||||
smartfile: require("smartfile"),
|
||||
smartpath: require("smartpath")
|
||||
exports.beautylog = require("beautylog");
|
||||
exports.fs = require("fs-extra");
|
||||
exports.gulp = require("gulp");
|
||||
exports.g = {
|
||||
coveralls: require("gulp-coveralls"),
|
||||
gFunction: require("gulp-function"),
|
||||
istanbul: require("gulp-istanbul"),
|
||||
jsdoc3: require("gulp-jsdoc3"),
|
||||
mocha: require("gulp-mocha"),
|
||||
sourcemaps: require("gulp-sourcemaps"),
|
||||
typescript: require("gulp-typescript"),
|
||||
typings: require("gulp-typings")
|
||||
};
|
||||
module.exports = plugins;
|
||||
exports.merge2 = require("merge2");
|
||||
exports.projectinfo = require("projectinfo");
|
||||
exports.sourceMapSupport = require("source-map-support").install();
|
||||
exports.path = require("path");
|
||||
exports.Q = require("q");
|
||||
exports.shelljs = require("shelljs");
|
||||
exports.smartci = require("smartci");
|
||||
exports.smartcli = require("smartcli");
|
||||
exports.smartenv = require("smartenv");
|
||||
exports.smartfile = require("smartfile");
|
||||
exports.smartpath = require("smartpath");
|
||||
|
Reference in New Issue
Block a user