20 lines
2.5 KiB
JavaScript
20 lines
2.5 KiB
JavaScript
"use strict";
|
|
require("typings-global");
|
|
var plugins = require("./npmci.plugins");
|
|
var npmci_bash_1 = require("./npmci.bash");
|
|
exports.trigger = function () {
|
|
var done = plugins.q.defer();
|
|
plugins.beautylog.info("now running triggers");
|
|
for (var i = 0; i < 100; i++) {
|
|
var iteratorString = i.toString();
|
|
if (process.env["TRIGGER" + iteratorString]) {
|
|
plugins.beautylog.log("Found TRIGGER" + iteratorString);
|
|
npmci_bash_1.bash("curl -X POST " + process.env["TRIGGER" + iteratorString]);
|
|
}
|
|
}
|
|
done.resolve();
|
|
return done.promise;
|
|
};
|
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnRyaWdnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBRTNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUV2QixlQUFPLEdBQUc7SUFDakIsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3QixPQUFPLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDO0lBQy9DLEdBQUcsQ0FBQSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUMsRUFBRSxFQUFDLENBQUM7UUFDekIsSUFBSSxjQUFjLEdBQUcsQ0FBQyxDQUFDLFFBQVEsRUFBRSxDQUFDO1FBQ2xDLEVBQUUsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxHQUFHLGNBQWMsQ0FBQyxDQUFDLENBQUEsQ0FB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