mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-10 19:39:17 +00:00
remove unused build module
This commit is contained in:
parent
150e360d36
commit
01a03ec4d7
43
lib/build.js
43
lib/build.js
@ -1,43 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var createScm = require('../lib/scm').createScm,
|
||||
createCommnd = require('../lib/command').createCommnd;
|
||||
|
||||
function Build(params) {
|
||||
this.config = params.config;
|
||||
this.cwd = params.cwd;
|
||||
}
|
||||
|
||||
exports.Build = Build;
|
||||
|
||||
Build.prototype.run = function(state, callback) {
|
||||
var self = this;
|
||||
state.step = state.step || 'getSources';
|
||||
this[state.step](state, function(err) {
|
||||
if (err) {
|
||||
state.err = err;
|
||||
self.onFailure(state, callback);
|
||||
return;
|
||||
}
|
||||
if (state.step === 'getSources') {
|
||||
state.step = 'steps';
|
||||
state.stepIndex = 0;
|
||||
} else if (state.step === 'steps') {
|
||||
if (state.stepIndex + 1 < self.config.steps.length) {
|
||||
state.stepIndex++;
|
||||
} else {
|
||||
delete state.stepIndex;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Build.prototype.getSources = function(state, callback) {
|
||||
|
||||
};
|
||||
|
||||
Build.prototype.steps = function(state, callback) {
|
||||
var cmdParams = this.config.steps[state.stepIndex];
|
||||
var cmd = createCommand({type: cmdParams.type});
|
||||
cmd.run(cmdParams, callback);
|
||||
};
|
Loading…
Reference in New Issue
Block a user