npmci/ts/npmci.trigger.ts

18 lines
601 B
TypeScript
Raw Normal View History

2016-06-01 04:30:21 +00:00
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);
2016-06-01 05:18:30 +00:00
plugins.request.post(process.env["TRIGGER" + iteratorString]);
2016-06-01 04:30:21 +00:00
}
}
done.resolve();
return done.promise;
}