fix small promise error
This commit is contained in:
parent
e8238dc907
commit
60d200135e
24
dist/npmts.jsdoc.js
vendored
24
dist/npmts.jsdoc.js
vendored
@ -34,23 +34,17 @@ exports.publishDocs = function (configArg) {
|
||||
+ "&& git push --force --quiet "
|
||||
+ "\"" + gitUrl + "\" "
|
||||
+ "master:gh-pages " + "> /dev/null 2>&1";
|
||||
if (configArg.docs.publish) {
|
||||
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
||||
if (!plugins.shelljs.which('git')) {
|
||||
plugins.beautylog.error('Git is not installed!');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
else if (plugins.shelljs.exec(deployScript).code !== 0) {
|
||||
plugins.beautylog.error('Git failed!');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
plugins.beautylog.ok("JsDoc documentation has been deployed to GitHub!");
|
||||
done.resolve(configArg);
|
||||
plugins.beautylog.log("now publishing JsDoc documentation to GitHub");
|
||||
if (!plugins.shelljs.which('git')) {
|
||||
plugins.beautylog.error('Git is not installed!');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
else {
|
||||
console.log("GitHub documentation has not been uploaded.");
|
||||
done.resolve(configArg);
|
||||
else if (plugins.shelljs.exec(deployScript).code !== 0) {
|
||||
plugins.beautylog.error('Git failed!');
|
||||
plugins.shelljs.exit(1);
|
||||
}
|
||||
plugins.beautylog.ok("JsDoc documentation has been deployed to GitHub!");
|
||||
done.resolve(configArg);
|
||||
return done.promise;
|
||||
};
|
||||
exports.run = function (configArg) {
|
||||
|
3
dist/npmts.promisechain.js
vendored
3
dist/npmts.promisechain.js
vendored
@ -40,6 +40,9 @@ exports.run = function () {
|
||||
console.log(shipString);
|
||||
plugins.beautylog.success("READY TO SHIP!");
|
||||
}
|
||||
else {
|
||||
plugins.beautylog.success("Done!");
|
||||
}
|
||||
});
|
||||
return promisechain;
|
||||
};
|
||||
|
2
dist/npmts.publish.js
vendored
2
dist/npmts.publish.js
vendored
@ -10,6 +10,6 @@ exports.run = function (configArg) {
|
||||
config.coveralls ? promiseArray.push(NpmtsTests.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);
|
||||
plugins.Q.all(promiseArray).then(done.resolve());
|
||||
plugins.Q.all(promiseArray).then(done.resolve);
|
||||
return done.promise;
|
||||
};
|
||||
|
13
dist/npmts.tests.js
vendored
13
dist/npmts.tests.js
vendored
@ -7,17 +7,10 @@ exports.publishCoverage = function (configArg) {
|
||||
plugins.beautylog.log("now uploading coverage data to coveralls");
|
||||
var stream = plugins.gulp.src([plugins.path.join(paths.cwd, "./coverage/lcov.info")])
|
||||
.pipe(plugins.g.coveralls())
|
||||
.pipe(plugins.g.gFunction([
|
||||
function () {
|
||||
var done = plugins.Q.defer();
|
||||
plugins.beautylog.ok("Coverage data has been uploaded to Coveralls!");
|
||||
done.resolve();
|
||||
return done.promise;
|
||||
}
|
||||
], "atEnd"));
|
||||
stream.on("finish", function () {
|
||||
.pipe(plugins.g.gFunction(function () {
|
||||
plugins.beautylog.ok("Coverage data has been uploaded to Coveralls!");
|
||||
done.resolve(configArg);
|
||||
});
|
||||
}, "atEnd"));
|
||||
return done.promise;
|
||||
};
|
||||
exports.run = function (configArg) {
|
||||
|
@ -40,6 +40,8 @@ export var run = function(){
|
||||
if (process.env.CI){
|
||||
console.log(shipString);
|
||||
plugins.beautylog.success("READY TO SHIP!");
|
||||
} else {
|
||||
plugins.beautylog.success("Done!")
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -14,6 +14,6 @@ export let run = function(configArg){
|
||||
config.docs.publish ? promiseArray.push(NpmtsJsdoc.publishDocs(configArg)) : 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);
|
||||
return done.promise;
|
||||
};
|
Loading…
Reference in New Issue
Block a user