improved GitLab compatibility
This commit is contained in:
parent
9d1c3f7457
commit
0dc45f1414
@ -51,7 +51,10 @@ the npmts.json is the main config file. You can use it to customize the behaviou
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"mode":"default",
|
"mode":"default",
|
||||||
"codecov":true,
|
"codecov":{
|
||||||
|
"publish":true,
|
||||||
|
"token":"sometoken"
|
||||||
|
},
|
||||||
"ts":{
|
"ts":{
|
||||||
"./customdir/*.ts":"./"
|
"./customdir/*.ts":"./"
|
||||||
},
|
},
|
||||||
|
7
dist/npmts.options.js
vendored
7
dist/npmts.options.js
vendored
@ -41,9 +41,10 @@ exports.run = function (configArg) {
|
|||||||
: plugins.beautylog.info("NOT A RELEASE build!");
|
: 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 + DOCS when tests succeed!")
|
exports.isRelease() && exports.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!");
|
: plugins.beautylog.info("We are not publishing anything!");
|
||||||
// handle coveralls
|
// handle codecov
|
||||||
config.codecov ? void (0) : config.codecov = true;
|
config.codecov ? void (0) : config.codecov = {};
|
||||||
exports.isCi() ? void (0) : config.codecov = false;
|
config.codecov.publish ? void (0) : config.codecov.publish = false;
|
||||||
|
exports.isCi() && (process.env.TRAVIS || config.codecov.token) ? void (0) : config.codecov = false;
|
||||||
config.coverageTreshold ? void (0) : config.coverageTreshold = 70;
|
config.coverageTreshold ? void (0) : config.coverageTreshold = 70;
|
||||||
// handle docs
|
// handle docs
|
||||||
config.docs ? void (0) : config.docs = {};
|
config.docs ? void (0) : config.docs = {};
|
||||||
|
15
dist/npmts.publish.js
vendored
15
dist/npmts.publish.js
vendored
@ -1,13 +1,24 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
require("typings-global");
|
require("typings-global");
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var NpmtsTests = require("./npmts.tests");
|
var paths = require("./npmts.paths");
|
||||||
var NpmtsJsdoc = require("./npmts.jsdoc");
|
var NpmtsJsdoc = require("./npmts.jsdoc");
|
||||||
|
exports.publishCoverage = function (configArg) {
|
||||||
|
var 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;
|
||||||
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
var config = configArg;
|
var config = configArg;
|
||||||
var promiseArray = [];
|
var promiseArray = [];
|
||||||
config.codecov && config.doPublish ? promiseArray.push(NpmtsTests.publishCoverage(configArg)) : void (0);
|
config.codecov.publish ? promiseArray.push(exports.publishCoverage(configArg)) : void (0);
|
||||||
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(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);
|
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : void (0);
|
||||||
plugins.Q.all(promiseArray).then(done.resolve);
|
plugins.Q.all(promiseArray).then(done.resolve);
|
||||||
|
11
dist/npmts.tests.js
vendored
11
dist/npmts.tests.js
vendored
@ -3,17 +3,6 @@ require("typings-global");
|
|||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
var paths = require("./npmts.paths");
|
var paths = require("./npmts.paths");
|
||||||
var npmts_promisechain_1 = require("./npmts.promisechain");
|
var npmts_promisechain_1 = require("./npmts.promisechain");
|
||||||
exports.publishCoverage = function (configArg) {
|
|
||||||
var 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 {*}
|
* @returns {*}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
"./subts2/typings.json",
|
"./subts2/typings.json",
|
||||||
"./customdir/typings.json"
|
"./customdir/typings.json"
|
||||||
],
|
],
|
||||||
"codecov":true,
|
|
||||||
"docs": {
|
"docs": {
|
||||||
"publish":true
|
"publish":true
|
||||||
},
|
},
|
||||||
|
@ -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!")
|
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!");
|
: plugins.beautylog.info("We are not publishing anything!");
|
||||||
|
|
||||||
// handle coveralls
|
// handle codecov
|
||||||
config.codecov ? void(0) : config.codecov = true;
|
config.codecov ? void(0) : config.codecov = {};
|
||||||
isCi() ? void(0) : config.codecov = false;
|
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;
|
config.coverageTreshold ? void(0) : config.coverageTreshold = 70;
|
||||||
|
|
||||||
|
@ -1,15 +1,25 @@
|
|||||||
import "typings-global";
|
import "typings-global";
|
||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
import paths = require("./npmts.paths");
|
import paths = require("./npmts.paths");
|
||||||
import NpmtsTests = require("./npmts.tests");
|
|
||||||
import NpmtsJsdoc = require("./npmts.jsdoc");
|
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){
|
export let run = function(configArg){
|
||||||
let done = plugins.Q.defer();
|
let done = plugins.Q.defer();
|
||||||
let config = configArg;
|
let config = configArg;
|
||||||
let promiseArray = [];
|
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);
|
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : void(0);
|
||||||
promiseArray.length === 0 ? plugins.beautylog.info("Did not publish anything!") : 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 paths = require("./npmts.paths");
|
||||||
import {npmtsOra} from "./npmts.promisechain";
|
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 {*}
|
* @returns {*}
|
||||||
|
Loading…
Reference in New Issue
Block a user