aboutsummaryrefslogtreecommitdiff
path: root/test/release/run.js
blob: 5dc851939d6c857db682fa6e5c1017d544eb6d6a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var child_process = require("child_process");

module.exports = function(tasks) {
    (function next() {
        if (!tasks.length) return;
        var args = tasks.shift();
        console.log();
        console.log("\u001B[36m$> " + args.join(" ") + "\u001B[39m");
        child_process.spawn(process.argv[0], args, {
            stdio: [ "ignore", 1, 2 ]
        }).on("exit", function(code) {
            if (code) process.exit(code);
            next();
        });
    })();
};