mirror of https://github.com/embarklabs/embark.git
fix a bug where upload cmd used plugin name
This commit is contained in:
parent
e4566f9f81
commit
d046feb83d
|
@ -312,7 +312,9 @@ class Embark {
|
|||
|
||||
if (cmdPlugins.length > 0) {
|
||||
cmdPlugin = cmdPlugins.find((pluginCmd) => {
|
||||
return pluginCmd.name == platform;
|
||||
return pluginCmd.uploadCmds.some(uploadCmd => {
|
||||
return uploadCmd.cmd === platform;
|
||||
});
|
||||
});
|
||||
}
|
||||
if (!cmdPlugin) {
|
||||
|
|
|
@ -32,18 +32,6 @@ module.exports = function (embark) {
|
|||
return "web3 = new Web3(new Web3.providers.HttpProvider('http://" + options.rpcHost + ":" + options.rpcPort + "'));";
|
||||
});
|
||||
|
||||
/*embark.registerContractsGeneration(function (options) {
|
||||
const contractGenerations = [];
|
||||
Object.keys(options.contracts).map(className => {
|
||||
const contract = options.contracts[className];
|
||||
const abi = JSON.stringify(contract.abiDefinition);
|
||||
|
||||
contractGenerations.push(`${className} = new this.web3.eth.contract('${abi}').at('${contract.deployedAddress}')`);
|
||||
});
|
||||
return contractGenerations.join('\n');
|
||||
// return '';
|
||||
});*/
|
||||
|
||||
embark.registerConsoleCommand((cmd) => {
|
||||
if (cmd === "hello") {
|
||||
return "hello there!";
|
||||
|
@ -52,4 +40,8 @@ module.exports = function (embark) {
|
|||
return false;
|
||||
});
|
||||
|
||||
embark.events.on("contractsDeployed", function() {
|
||||
embark.logger.info("plugin says: your contracts have been deployed");
|
||||
});
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue