mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
fix(@embark/cmd): output contract json
This fix ensures that `embark build --contracts` outputs the contracts the same way a normal build would.
This commit is contained in:
parent
46e351ed36
commit
4dca72368b
@ -213,10 +213,10 @@ class EmbarkController {
|
|||||||
engine.startService("processManager");
|
engine.startService("processManager");
|
||||||
engine.startService("libraryManager");
|
engine.startService("libraryManager");
|
||||||
engine.startService("codeRunner");
|
engine.startService("codeRunner");
|
||||||
|
engine.startService("pipeline");
|
||||||
if (!options.onlyCompile) {
|
if (!options.onlyCompile) {
|
||||||
engine.startService("web3");
|
engine.startService("web3");
|
||||||
engine.startService("deployment", {onlyCompile: options.onlyCompile});
|
engine.startService("deployment", {onlyCompile: options.onlyCompile});
|
||||||
engine.startService("pipeline");
|
|
||||||
engine.startService("storage");
|
engine.startService("storage");
|
||||||
engine.startService("codeGenerator");
|
engine.startService("codeGenerator");
|
||||||
} else {
|
} else {
|
||||||
@ -226,12 +226,14 @@ class EmbarkController {
|
|||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
function buildOrBuildAndDeploy(callback) {
|
function buildOrBuildAndDeploy(callback) {
|
||||||
if (options.onlyCompile) {
|
if (options.onlyCompile)
|
||||||
engine.events.request('contracts:build', {}, err => callback(err));
|
return engine.events.request('contracts:build', {}, err => {
|
||||||
} else {
|
if(err !== undefined) return callback(err);
|
||||||
|
engine.events.request('pipeline:build:contracts', err => callback(err));
|
||||||
|
});
|
||||||
|
|
||||||
// deploy:contracts will trigger a build as well
|
// deploy:contracts will trigger a build as well
|
||||||
engine.events.request('deploy:contracts', err => callback(err));
|
engine.events.request('deploy:contracts', err => callback(err));
|
||||||
}
|
|
||||||
},
|
},
|
||||||
function waitForWriteFinish(callback) {
|
function waitForWriteFinish(callback) {
|
||||||
if (options.onlyCompile) {
|
if (options.onlyCompile) {
|
||||||
|
@ -22,6 +22,7 @@ class Pipeline {
|
|||||||
this.isFirstBuild = true;
|
this.isFirstBuild = true;
|
||||||
|
|
||||||
this.events.setCommandHandler('pipeline:build', (options, callback) => this.build(options, callback));
|
this.events.setCommandHandler('pipeline:build', (options, callback) => this.build(options, callback));
|
||||||
|
this.events.setCommandHandler('pipeline:build:contracts', callback => this.buildContracts(callback));
|
||||||
fs.removeSync(this.buildDir);
|
fs.removeSync(this.buildDir);
|
||||||
|
|
||||||
let plugin = this.plugins.createPlugin('deployment', {});
|
let plugin = this.plugins.createPlugin('deployment', {});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user