mirror of https://github.com/embarklabs/embark.git
fix runActions in deployment; fix special configs
This commit is contained in:
parent
2931fce1ba
commit
454a710367
|
@ -18,8 +18,8 @@ class DeployTracker {
|
|||
this.chainConfig = {};
|
||||
this.chainFile = embark.config.contractsConfig.tracking;
|
||||
|
||||
// this.events.on("blockchain:started", this.loadChainTrackerFile.bind(this));
|
||||
// this.embark.registerActionForEvent('deployment:deployContracts:beforeAll', this.setCurrentChain.bind(this));
|
||||
this.events.on("blockchain:started", this.loadChainTrackerFile.bind(this));
|
||||
this.embark.registerActionForEvent('deployment:deployContracts:beforeAll', this.setCurrentChain.bind(this));
|
||||
// this.embark.registerActionForEvent("deployment:contract:deployed", this.trackAndSaveContract.bind(this));
|
||||
// this.embark.registerActionForEvent("deploy:contract:shouldDeploy", this.checkIfDeploymentIsNeeded.bind(this));
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ class DeployTracker {
|
|||
}
|
||||
|
||||
setCurrentChain(_params, callback) {
|
||||
if (!this.embark.config.contractsConfig.tracking) return;
|
||||
if (this.chainFile === false) return;
|
||||
if (!this.embark.config.contractsConfig.tracking) return callback();
|
||||
if (this.chainFile === false) return callback();
|
||||
if (this.chainConfig === false) {
|
||||
this.currentChain = {contracts: []};
|
||||
return callback();
|
||||
|
|
|
@ -27,11 +27,11 @@ class Deployment {
|
|||
this.logger.info(__("deploying contracts"));
|
||||
async.waterfall([
|
||||
// TODO used to be called this.plugins.emitAndRunActionsForEvent("deploy:beforeAll", (err) => {
|
||||
(next) => { this.plugins.emitAndRunActionsForEvent('deployment:deployContracts:beforeAll', () => { next() }); },
|
||||
(next) => { this.plugins.emitAndRunActionsForEvent('deployment:deployContracts:beforeAll', {}, () => { next() }); },
|
||||
(next) => { this.deployAll(contracts, contractDependencies, () => { next() }); },
|
||||
(next) => {
|
||||
this.events.emit('contractsDeployed');
|
||||
this.plugins.emitAndRunActionsForEvent('deployment:deployContracts:afterAll', () => { next() });
|
||||
this.plugins.emitAndRunActionsForEvent('deployment:deployContracts:afterAll', {}, () => { next() });
|
||||
console.dir("==== finished deploying");
|
||||
}
|
||||
], done);
|
||||
|
|
|
@ -22,14 +22,14 @@ class SpecialConfigs {
|
|||
this.embark.registerActionForEvent('deployment:contract:beforeDeploy', this.beforeDeployAction.bind(this));
|
||||
}
|
||||
|
||||
async beforeAllDeployAction(cb) {
|
||||
async beforeAllDeployAction(_params, cb) {
|
||||
if (typeof this.config.contractsConfig.beforeDeploy !== 'function') {
|
||||
return this.listConfigs.beforeAllDeployAction(cb);
|
||||
}
|
||||
return this.functionConfigs.beforeAllDeployAction(cb);
|
||||
}
|
||||
|
||||
async afterAllDeployAction(cb) {
|
||||
async afterAllDeployAction(_params, cb) {
|
||||
if (typeof this.config.contractsConfig.afterDeploy !== 'function') {
|
||||
return this.listConfigs.afterAllDeployAction(cb);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue