grunt-nexus-deployer
Version:
Deploy artifacts with classifiers to release/snapshot maven repository.
36 lines (33 loc) • 722 B
JavaScript
;
var exitFn, stdFn, ef;
var data = {releases: [], snapshots: []};
var childProcess = {
on: function (type, fn) {
exitFn = fn;
},
stdout: {
on: function (type, fn) {
stdFn = fn;
}
},
stderr: {
on: function (type, fn) {
ef = fn;
}
},
data: function (key) {
return data[key];
}
};
module.exports = function (cmd) {
if (/repository\/local-releases/.test(cmd)) {
data.releases.push(cmd);
} else if (/repository\/local-snapshots/.test(cmd)) {
data.snapshots.push(cmd);
}
setTimeout(function () {
stdFn("200");
exitFn(0);
}, 100)
return childProcess;
};