add optional docs publishing
This commit is contained in:
parent
070385867e
commit
f7304f59a5
@ -2,5 +2,6 @@
|
|||||||
support
|
support
|
||||||
compile
|
compile
|
||||||
test/
|
test/
|
||||||
|
docs/
|
||||||
examples
|
examples
|
||||||
.gitignore
|
.gitignore
|
2
dist/npmts.jsdoc.js
vendored
2
dist/npmts.jsdoc.js
vendored
@ -32,7 +32,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) {
|
if (plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish) {
|
||||||
plugins.beautylog.log("now publishing docs to GitHub");
|
plugins.beautylog.log("now publishing docs 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');
|
||||||
|
@ -9,5 +9,8 @@
|
|||||||
"./subts2/",
|
"./subts2/",
|
||||||
"./customdir"
|
"./customdir"
|
||||||
],
|
],
|
||||||
"coveralls":true
|
"coveralls":true,
|
||||||
|
"docs": {
|
||||||
|
"publish":true
|
||||||
|
}
|
||||||
}
|
}
|
@ -39,8 +39,8 @@ 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){
|
if(plugins.smartenv.getEnv().isTravis && configArg.docs && configArg.docs.publish){
|
||||||
plugins.beautylog.log("now publishing docs to GitHub")
|
plugins.beautylog.log("now publishing docs 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');
|
||||||
plugins.shelljs.exit(1);
|
plugins.shelljs.exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user