Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
48a9d19b8e | |||
7d39683972 | |||
01e9f386a6 | |||
2f4fb28b5d | |||
50b14e60c6 | |||
4753a4ff82 |
2
dist/npmts.jsdoc.js
vendored
2
dist/npmts.jsdoc.js
vendored
@ -34,7 +34,7 @@ var publishDocs = function (configArg) {
|
|||||||
+ "&& git push --force --quiet "
|
+ "&& git push --force --quiet "
|
||||||
+ "\"" + gitUrl + "\" "
|
+ "\"" + gitUrl + "\" "
|
||||||
+ "master:gh-pages " + "> /dev/null 2>&1";
|
+ "master:gh-pages " + "> /dev/null 2>&1";
|
||||||
if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
|
if (configArg.docs.publish) {
|
||||||
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
||||||
if (!plugins.shelljs.which('git')) {
|
if (!plugins.shelljs.which('git')) {
|
||||||
plugins.beautylog.error('Git is not installed!');
|
plugins.beautylog.error('Git is not installed!');
|
||||||
|
28
dist/npmts.options.js
vendored
28
dist/npmts.options.js
vendored
@ -2,12 +2,12 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
var plugins = require("./npmts.plugins");
|
var plugins = require("./npmts.plugins");
|
||||||
exports.isRelease = function () {
|
exports.isRelease = function () {
|
||||||
if (plugins.smartci.check.isCi() && plugins.smartci.isTaggedCommit()) {
|
return plugins.smartci.check.isCi()
|
||||||
return true;
|
&& plugins.smartci.check.isTaggedCommit();
|
||||||
}
|
};
|
||||||
else {
|
exports.doPublish = function () {
|
||||||
return false;
|
return exports.isRelease()
|
||||||
}
|
&& plugins.smartci.get.subJobNumber() != 1;
|
||||||
};
|
};
|
||||||
exports.run = function (configArg) {
|
exports.run = function (configArg) {
|
||||||
var done = plugins.Q.defer();
|
var done = plugins.Q.defer();
|
||||||
@ -26,13 +26,17 @@ exports.run = function (configArg) {
|
|||||||
config.test = ["./index.js"];
|
config.test = ["./index.js"];
|
||||||
}
|
}
|
||||||
// handle state of current build
|
// handle state of current build
|
||||||
exports.isRelease() ? plugins.beautylog.info("All right this is a release build!")
|
exports.isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!")
|
||||||
: 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 and docs when tests succeed!")
|
||||||
|
: plugins.beautylog.info("We are not publishing anything!");
|
||||||
// handle coveralls
|
// handle coveralls
|
||||||
if ((typeof config.coveralls === "undefined" || !exports.isRelease())
|
config.coveralls ? void (0) : config.coveralls = false;
|
||||||
&& plugins.smartci.get.subJobNumber == 1) {
|
exports.doPublish() ? void (0) : config.coveralls = false;
|
||||||
config.coveralls = false;
|
// handle docs
|
||||||
}
|
config.docs ? void (0) : config.docs = {};
|
||||||
|
config.docs.publish ? void (0) : config.docs.publish = false;
|
||||||
|
exports.doPublish() ? void (0) : config.docs.publish = false;
|
||||||
done.resolve(config);
|
done.resolve(config);
|
||||||
return done.promise;
|
return done.promise;
|
||||||
var _a;
|
var _a;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "3.6.0",
|
"version": "3.6.3",
|
||||||
"description": "write npm modules with TypeScript",
|
"description": "write npm modules with TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -40,7 +40,7 @@ var publishDocs = function(configArg){
|
|||||||
+ "\"" + gitUrl + "\" "
|
+ "\"" + gitUrl + "\" "
|
||||||
+ "master:gh-pages " + "> /dev/null 2>&1";
|
+ "master:gh-pages " + "> /dev/null 2>&1";
|
||||||
|
|
||||||
if(plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish){
|
if(configArg.docs.publish){
|
||||||
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
||||||
if (!plugins.shelljs.which('git')) {
|
if (!plugins.shelljs.which('git')) {
|
||||||
plugins.beautylog.error('Git is not installed!');
|
plugins.beautylog.error('Git is not installed!');
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
import plugins = require("./npmts.plugins");
|
import plugins = require("./npmts.plugins");
|
||||||
|
|
||||||
export let isRelease = function():boolean {
|
export let isRelease = function():boolean {
|
||||||
if (plugins.smartci.check.isCi() && plugins.smartci.isTaggedCommit()){
|
return plugins.smartci.check.isCi()
|
||||||
return true;
|
&& plugins.smartci.check.isTaggedCommit();
|
||||||
} else {
|
};
|
||||||
return false;
|
|
||||||
}
|
export let doPublish = function():boolean {
|
||||||
|
return isRelease()
|
||||||
|
&& plugins.smartci.get.subJobNumber() == 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
export var run = function(configArg){
|
export var run = function(configArg){
|
||||||
@ -29,16 +31,19 @@ export var run = function(configArg){
|
|||||||
|
|
||||||
// handle state of current build
|
// handle state of current build
|
||||||
|
|
||||||
isRelease() ? plugins.beautylog.info("All right this is a release build!")
|
isRelease() ? plugins.beautylog.info("All right: This is a RELEASE build!")
|
||||||
: plugins.beautylog.info("not a release build!");
|
: 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
|
// handle coveralls
|
||||||
if (
|
config.coveralls ? void(0) : config.coveralls = false;
|
||||||
(typeof config.coveralls === "undefined" || !isRelease())
|
doPublish() ? void(0) : config.coveralls = false;
|
||||||
&& plugins.smartci.get.subJobNumber == 1
|
|
||||||
){
|
// handle docs
|
||||||
config.coveralls = false;
|
config.docs ? void(0) : config.docs = {};
|
||||||
}
|
config.docs.publish ? void(0) : config.docs.publish = false;
|
||||||
|
doPublish() ? void(0) : config.docs.publish = false;
|
||||||
|
|
||||||
done.resolve(config);
|
done.resolve(config);
|
||||||
return done.promise;
|
return done.promise;
|
||||||
|
Reference in New Issue
Block a user