improved GitLab compatibility
This commit is contained in:
@ -49,9 +49,11 @@ export var run = function(configArg){
|
||||
isRelease() && doPublish() ? plugins.beautylog.info("All right: This is the first subBuild, so this one publishes COVERAGE + DOCS when tests succeed!")
|
||||
: plugins.beautylog.info("We are not publishing anything!");
|
||||
|
||||
// handle coveralls
|
||||
config.codecov ? void(0) : config.codecov = true;
|
||||
isCi() ? void(0) : config.codecov = false;
|
||||
// handle codecov
|
||||
config.codecov ? void(0) : config.codecov = {};
|
||||
config.codecov.publish ? void(0) : config.codecov.publish = false;
|
||||
isCi() && (process.env.TRAVIS || config.codecov.token) ? void(0) : config.codecov = false;
|
||||
|
||||
|
||||
config.coverageTreshold ? void(0) : config.coverageTreshold = 70;
|
||||
|
||||
|
@ -1,15 +1,25 @@
|
||||
import "typings-global";
|
||||
import plugins = require("./npmts.plugins");
|
||||
import paths = require("./npmts.paths");
|
||||
import NpmtsTests = require("./npmts.tests");
|
||||
import NpmtsJsdoc = require("./npmts.jsdoc");
|
||||
|
||||
export let publishCoverage = function(configArg){
|
||||
let done = plugins.Q.defer();
|
||||
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")])
|
||||
.pipe(plugins.g.codecov())
|
||||
.pipe(plugins.g.gFunction(function(){
|
||||
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
||||
done.resolve(configArg);
|
||||
},"atEnd"));
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
export let run = function(configArg){
|
||||
let done = plugins.Q.defer();
|
||||
let config = configArg;
|
||||
let promiseArray = [];
|
||||
config.codecov && config.doPublish ? promiseArray.push(NpmtsTests.publishCoverage(configArg)) : void(0);
|
||||
config.codecov.publish ? promiseArray.push(publishCoverage(configArg)) : void(0);
|
||||
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void(0);
|
||||
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void(0);
|
||||
|
||||
|
@ -3,18 +3,6 @@ import plugins = require("./npmts.plugins");
|
||||
import paths = require("./npmts.paths");
|
||||
import {npmtsOra} from "./npmts.promisechain";
|
||||
|
||||
export let publishCoverage = function(configArg){
|
||||
let done = plugins.Q.defer();
|
||||
plugins.beautylog.log("now uploading coverage data to codecov.io");
|
||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd,"./coverage/lcov.info")])
|
||||
.pipe(plugins.g.codecov())
|
||||
.pipe(plugins.g.gFunction(function(){
|
||||
plugins.beautylog.ok("Coverage data has been uploaded to codecov.io!");
|
||||
done.resolve(configArg);
|
||||
},"atEnd"));
|
||||
return done.promise;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {*}
|
||||
|
Reference in New Issue
Block a user