Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 412e6ec9ba | |||
| 8d67cf2a8f | |||
| 3a6e2d6f3d |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmci",
|
"name": "npmci",
|
||||||
"version": "2.0.8",
|
"version": "2.0.10",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ plugins.beautylog.info("npmci version: " + packJson.version);
|
|||||||
import {install} from "./npmci.install";
|
import {install} from "./npmci.install";
|
||||||
import {test} from "./npmci.test";
|
import {test} from "./npmci.test";
|
||||||
import {publish} from "./npmci.publish";
|
import {publish} from "./npmci.publish";
|
||||||
|
import {trigger} from "./npmci.trigger";
|
||||||
|
|
||||||
|
|
||||||
let command;
|
let command;
|
||||||
@@ -39,7 +40,8 @@ switch (command){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case "publish":
|
case "publish":
|
||||||
publish(commandOption);
|
publish(commandOption)
|
||||||
|
.then(trigger);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
18
ts/npmci.trigger.ts
Normal file
18
ts/npmci.trigger.ts
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user