Compare commits

...

4 Commits

Author SHA1 Message Date
ff1a7398da 2.0.11 2016-06-01 06:39:13 +02:00
412e6ec9ba 2.0.10 2016-06-01 06:38:48 +02:00
8d67cf2a8f 2.0.9 2016-06-01 06:30:32 +02:00
3a6e2d6f3d run triggers 2016-06-01 06:30:21 +02:00
3 changed files with 22 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "npmci",
"version": "2.0.8",
"version": "2.0.11",
"description": "",
"main": "dist/index.js",
"bin": {

View File

@@ -9,6 +9,7 @@ plugins.beautylog.info("npmci version: " + packJson.version);
import {install} from "./npmci.install";
import {test} from "./npmci.test";
import {publish} from "./npmci.publish";
import {trigger} from "./npmci.trigger";
let command;
@@ -39,7 +40,8 @@ switch (command){
break;
case "publish":
publish(commandOption);
publish(commandOption)
.then(trigger);
break;
default:
break;

18
ts/npmci.trigger.ts Normal file
View File

@@ -0,0 +1,18 @@
import "typings-global";
import * as plugins from "./npmci.plugins";
import {prepare} from "./npmci.prepare";
import {bash} from "./npmci.bash";
export let trigger = function(){
let done = plugins.q.defer();
plugins.beautylog.info("now running triggers");
for(let i = 0; i < 100; i++){
let iteratorString = i.toString();
if(process.env["TRIGGER" + iteratorString]){
plugins.beautylog.log("Found TRIGGER" + iteratorString);
bash("curl -X POST " + process.env["TRIGGER" + iteratorString]);
}
}
done.resolve();
return done.promise;
}