Compare commits

...

5 Commits

Author SHA1 Message Date
e43541cf90 3.2.2 2016-02-23 18:35:36 +01:00
414e845b80 fix config traveling 2016-02-23 18:35:28 +01:00
c18eb85ec8 fixed repo path 2016-02-23 18:24:07 +01:00
3ae3598c96 update env vars 2016-02-23 18:10:03 +01:00
26eca7aa65 added GitHub Token again 2016-02-23 17:44:35 +01:00
5 changed files with 58 additions and 60 deletions

View File

@ -1,7 +1,7 @@
language: node_js
node_js:
- "4.3.1"
- "stable"
- 4.3.1
- stable
deploy:
provider: npm
email: npm@lossless.digital
@ -10,3 +10,6 @@ deploy:
on:
tags: true
repo: pushrocks/npmts
env:
global:
secure: dsyzaiCghJroEC6MK6PHq/IBRC/PjnHO+ucdiX73E7mdYV7wQvnqnd9+81vyqwdtSiIYM8VaO73PNJ3NkBRX5ANDU+WwVywxQqsRZoEeNxhTbU0/RFSa3jEJBcFTMwUC19vtlnKJ+j0FgU+ywFZ8ae7pky0SNGHpu9FLOqRNLy9nHkFrivcok4DHy/tz3WCJQdXDi+NJ4Thst96qbN99RnbHMfS4Z7TilAUEeeLre3NuYBWcZDYSrPLwuDs8BI1zct42YelBeL0EkAhp3WWoUUIOvOyjhrU0RhGyLWueIigPVYGD5xu4b1AfC7nMXNMmmMcDtGmeN/XBcFtEPeiSd8tocq26QS6pSvQ8xe1dDB9xdxfVAk9omXtZLsKIzuZ5lD7cZMSrEAW3ZMjHFAx4M2PKUmsoiJrU11tdxKHAknxNYTMVrUbtKBpu1weV+LSZOecOwV3l6s/azgSp97OVIn6Cr/AwoYTA+oWhuxdYf1f0Sq3KYckDw+57nG8cLUL+mZdvY81yHau+3xgSAwfjWgYgyeoZyCUz/QU1HCk4khJGsLc/bgyj3iCKv3S9IT5wUYkgRS+7+NGgG+PEaMZ2Ud2h0o6s7MXvW2aFb5IZ4+Jz51rH49sPUd4qBmYu2LwHCCdrwJeuvUZVoP61xHmnX4dpig3HJGuTh+Ihz8GQnqA=

50
dist/npmts.jsdoc.js vendored
View File

@ -3,7 +3,7 @@
/// <reference path="./typings/main.d.ts" />
var plugins = require("./npmts.plugins");
var paths = require("./npmts.paths");
var genJsdoc = function () {
var genJsdoc = function (configArg) {
var done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
plugins.gulp.src([
@ -14,30 +14,28 @@ var genJsdoc = function () {
opts: {
destination: paths.docsDir
}
}, done.resolve));
}, function () {
done.resolve(configArg);
}));
return done.promise;
};
var publishDocs = function () {
var publishDocs = function (configArg) {
var done = plugins.Q.defer();
try {
var gitUrl = plugins.projectinfo.npm(paths.cwd, {
gitAccessToken: process.env.GITHUB_TOKEN
}).git.httpsUrl;
var deployScript = ""
+ "cd " + paths.docsDir + " "
+ "&& git init "
+ "&& git config user.name \"TRAVIS CI\" "
+ "&& git config user.email \"travis@shipzone.io\" "
+ "&& git add . "
+ "&& git commit -m \"Deploy to GitHub Pages\" "
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages "
+ "> /dev/null 2>&1";
}
catch (err) {
console.log(err);
}
var gitUrl = plugins.projectinfo.npm(paths.cwd, {
gitAccessToken: process.env.GITHUB_TOKEN
}).git.httpsUrl;
var deployScript = ""
+ "cd " + paths.docsDir + " "
+ "&& git init "
+ "&& git config user.name \"TRAVIS CI\" "
+ "&& git config user.email \"travis@shipzone.io\" "
+ "&& git add . "
+ "&& git commit -m \"Deploy to GitHub Pages\" "
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages "
+ "> /dev/null 2>&1";
console.log(deployScript);
if (plugins.smartenv.getEnv().isTravis) {
plugins.beautylog.log("now publishing docs to GitHub");
if (!plugins.shelljs.which('git')) {
@ -48,16 +46,16 @@ var publishDocs = function () {
plugins.beautylog.error('Error: Git failed');
plugins.shelljs.exit(1);
}
done.resolve();
done.resolve(configArg);
}
else {
done.resolve();
done.resolve(configArg);
}
return done.promise;
};
exports.run = function () {
exports.run = function (configArg) {
var done = plugins.Q.defer();
genJsdoc()
genJsdoc(configArg)
.then(publishDocs)
.then(done.resolve);
return done.promise;

View File

@ -1,6 +1,6 @@
{
"name": "npmts",
"version": "3.2.1",
"version": "3.2.2",
"description": "write npm modules with TypeScript",
"main": "dist/index.js",
"bin": {
@ -31,7 +31,6 @@
"gulp-concat": "^2.6.0",
"gulp-coveralls": "^0.1.4",
"gulp-function": "^1.1.1",
"gulp-header": "^1.7.1",
"gulp-if": "^2.0.0",
"gulp-istanbul": "^0.10.3",
"gulp-jsdoc3": "^0.2.0",

View File

@ -5,7 +5,7 @@
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/sometest/somerepo.git"
"url": "git+https://github.com/pushrocks/npmts.git"
},
"scripts": {
"test": "(npmts)"

View File

@ -2,7 +2,7 @@
import plugins = require("./npmts.plugins");
import paths = require("./npmts.paths");
var genJsdoc = function(){
var genJsdoc = function(configArg){
var done = plugins.Q.defer();
plugins.beautylog.log("now generating " + "JsDoc documentation".blue);
plugins.gulp.src([
@ -13,35 +13,33 @@ var genJsdoc = function(){
opts: {
destination: paths.docsDir
}
}, done.resolve));
}, function(){
done.resolve(configArg)
}));
return done.promise;
};
var publishDocs = function(){
var publishDocs = function(configArg){
var done = plugins.Q.defer();
try {
var gitUrl = plugins.projectinfo.npm(
paths.cwd,
{
gitAccessToken:process.env.GITHUB_TOKEN
}
).git.httpsUrl;
var gitUrl = plugins.projectinfo.npm(
paths.cwd,
{
gitAccessToken:process.env.GITHUB_TOKEN
}
).git.httpsUrl;
var deployScript = ""
+ "cd " + paths.docsDir + " "
+ "&& git init "
+ "&& git config user.name \"TRAVIS CI\" "
+ "&& git config user.email \"travis@shipzone.io\" "
+ "&& git add . "
+ "&& git commit -m \"Deploy to GitHub Pages\" "
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages "
+ "> /dev/null 2>&1";
}
catch (err){
console.log(err);
}
var deployScript = ""
+ "cd " + paths.docsDir + " "
+ "&& git init "
+ "&& git config user.name \"TRAVIS CI\" "
+ "&& git config user.email \"travis@shipzone.io\" "
+ "&& git add . "
+ "&& git commit -m \"Deploy to GitHub Pages\" "
+ "&& git push --force --quiet "
+ "\"" + gitUrl + "\" "
+ "master:gh-pages "
+ "> /dev/null 2>&1";
console.log(deployScript);
if(plugins.smartenv.getEnv().isTravis){
plugins.beautylog.log("now publishing docs to GitHub")
@ -52,17 +50,17 @@ var publishDocs = function(){
plugins.beautylog.error('Error: Git failed');
plugins.shelljs.exit(1);
}
done.resolve();
done.resolve(configArg);
} else {
done.resolve();
done.resolve(configArg);
}
return done.promise;
};
export var run = function(){
export var run = function(configArg){
var done = plugins.Q.defer();
genJsdoc()
genJsdoc(configArg)
.then(publishDocs)
.then(done.resolve);
return done.promise;