Merge pull request #578 from embark-framework/bug_fix/upload-fail-solc-plugin_3_1
Bug fix/upload fail solc plugin 3 1
This commit is contained in:
commit
d4ab94ead5
|
@ -25,7 +25,9 @@ class Simulator {
|
||||||
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
|
let port = (options.port || this.blockchainConfig.rpcPort || 8545);
|
||||||
|
|
||||||
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
|
cmds.push("-p " + (port + (useProxy ? constants.blockchain.servicePortOnProxy : 0)));
|
||||||
|
if (!ganache) {
|
||||||
cmds.push("-h " + host);
|
cmds.push("-h " + host);
|
||||||
|
}
|
||||||
cmds.push("-a " + (options.numAccounts || 10));
|
cmds.push("-a " + (options.numAccounts || 10));
|
||||||
cmds.push("-e " + (options.defaultBalance || 100));
|
cmds.push("-e " + (options.defaultBalance || 100));
|
||||||
cmds.push("-l " + (options.gasLimit || 8000000));
|
cmds.push("-l " + (options.gasLimit || 8000000));
|
||||||
|
@ -43,7 +45,7 @@ class Simulator {
|
||||||
}
|
}
|
||||||
|
|
||||||
const program = ganache ? 'ganache-cli' : 'testrpc';
|
const program = ganache ? 'ganache-cli' : 'testrpc';
|
||||||
|
console.log(`running: ${program} ${cmds.join(' ')}`);
|
||||||
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});
|
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});
|
||||||
|
|
||||||
if(useProxy){
|
if(useProxy){
|
||||||
|
|
29
lib/index.js
29
lib/index.js
|
@ -194,7 +194,9 @@ class Embark {
|
||||||
engine.startService("libraryManager");
|
engine.startService("libraryManager");
|
||||||
engine.startService("codeRunner");
|
engine.startService("codeRunner");
|
||||||
engine.startService("web3");
|
engine.startService("web3");
|
||||||
|
if (!options.onlyCompile) {
|
||||||
engine.startService("pipeline");
|
engine.startService("pipeline");
|
||||||
|
}
|
||||||
engine.startService("deployment", {onlyCompile: options.onlyCompile});
|
engine.startService("deployment", {onlyCompile: options.onlyCompile});
|
||||||
engine.startService("storage");
|
engine.startService("storage");
|
||||||
engine.startService("codeGenerator");
|
engine.startService("codeGenerator");
|
||||||
|
@ -206,21 +208,30 @@ class Embark {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
function waitForWriteFinish(callback) {
|
function waitForWriteFinish(callback) {
|
||||||
engine.logger.info("Finished deploying".underline);
|
if (options.onlyCompile) {
|
||||||
// Necessary log for simple projects. This event is trigger to soon because there is no file
|
engine.logger.info("Finished compiling".underline);
|
||||||
// Also, not exiting straight after the deploy leaves time for async afterDeploys to finish
|
return callback(null, true);
|
||||||
engine.logger.info("If you have no files to build, you can exit now with CTRL+C");
|
|
||||||
engine.events.on('outputDone', callback);
|
|
||||||
}
|
}
|
||||||
], function (err, _result) {
|
engine.logger.info("Finished deploying".underline);
|
||||||
|
if (!engine.config.assetFiles || !Object.keys(engine.config.assetFiles).length) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
engine.events.on('outputDone', (err) => {
|
||||||
|
engine.logger.info(__("finished building").underline);
|
||||||
|
callback(err, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
], function (err, canExit) {
|
||||||
if (err) {
|
if (err) {
|
||||||
engine.logger.error(err.message);
|
engine.logger.error(err.message);
|
||||||
engine.logger.debug(err.stack);
|
engine.logger.debug(err.stack);
|
||||||
} else {
|
|
||||||
engine.logger.info(__("finished building").underline);
|
|
||||||
}
|
}
|
||||||
// needed due to child processes
|
|
||||||
|
if (canExit || !engine.config.contractsConfig.afterDeploy || !engine.config.contractsConfig.afterDeploy.length) {
|
||||||
process.exit();
|
process.exit();
|
||||||
|
}
|
||||||
|
engine.logger.info(__('Waiting for after deploy to finish...'));
|
||||||
|
engine.logger.info(__('You can exit with CTRL+C when after deploy completes'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue