mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
Merge pull request #424 from embark-framework/features/remove-upload-option
Removed `platform` from the upload command line option as it is being specified in the storage.json config.
This commit is contained in:
commit
c1de9defcd
@ -191,17 +191,17 @@ class Cmd {
|
|||||||
|
|
||||||
upload() {
|
upload() {
|
||||||
program
|
program
|
||||||
.command('upload <platform> [environment]')
|
.command('upload [environment]')
|
||||||
.option('--logfile [logfile]', __('filename to output logs (default: %s)', 'none'))
|
.option('--logfile [logfile]', __('filename to output logs (default: %s)', 'none'))
|
||||||
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
|
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
|
||||||
.option('--locale [locale]', __('language to use (default: en)'))
|
.option('--locale [locale]', __('language to use (default: en)'))
|
||||||
.description(__('Upload your dapp to a decentralized storage') + ' (e.g embark upload ipfs).')
|
.description(__('Upload your dapp to a decentralized storage') + ' (e.g embark upload ipfs).')
|
||||||
.action(function (platform, env, _options) {
|
.action(function (env, _options) {
|
||||||
i18n.setOrDetectLocale(_options.locale);
|
i18n.setOrDetectLocale(_options.locale);
|
||||||
_options.env = env || 'development';
|
_options.env = env || 'development';
|
||||||
_options.logFile = _options.logfile; // fix casing
|
_options.logFile = _options.logfile; // fix casing
|
||||||
_options.logLevel = _options.loglevel; // fix casing
|
_options.logLevel = _options.loglevel; // fix casing
|
||||||
embark.upload(platform, _options);
|
embark.upload(_options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
"Contract Name": "Contract Name",
|
"Contract Name": "Contract Name",
|
||||||
"New Application": "New Application",
|
"New Application": "New Application",
|
||||||
"create a barebones project meant only for contract development": "create a barebones project meant only for contract development",
|
"create a barebones project meant only for contract development": "create a barebones project meant only for contract development",
|
||||||
|
"language to use (default: en)": "language to use (default: en)",
|
||||||
"create a working dapp with a SimpleStorage contract": "create a working dapp with a SimpleStorage contract",
|
"create a working dapp with a SimpleStorage contract": "create a working dapp with a SimpleStorage contract",
|
||||||
"filename to output logs (default: none)": "filename to output logs (default: none)",
|
"filename to output logs (default: none)": "filename to output logs (default: none)",
|
||||||
"level of logging to display": "level of logging to display",
|
"level of logging to display": "level of logging to display",
|
||||||
@ -25,6 +26,9 @@
|
|||||||
"custom gas limit (default: %s)": "custom gas limit (default: %s)",
|
"custom gas limit (default: %s)": "custom gas limit (default: %s)",
|
||||||
"run tests": "run tests",
|
"run tests": "run tests",
|
||||||
"resets embarks state on this dapp including clearing cache": "resets embarks state on this dapp including clearing cache",
|
"resets embarks state on this dapp including clearing cache": "resets embarks state on this dapp including clearing cache",
|
||||||
|
"Graph will not include undeployed contracts": "Graph will not include undeployed contracts",
|
||||||
|
"Graph will not include functions": "Graph will not include functions",
|
||||||
|
"Graph will not include events": "Graph will not include events",
|
||||||
"generates documentation based on the smart contracts configured": "generates documentation based on the smart contracts configured",
|
"generates documentation based on the smart contracts configured": "generates documentation based on the smart contracts configured",
|
||||||
"Upload your dapp to a decentralized storage": "Upload your dapp to a decentralized storage",
|
"Upload your dapp to a decentralized storage": "Upload your dapp to a decentralized storage",
|
||||||
"output the version number": "output the version number",
|
"output the version number": "output the version number",
|
||||||
@ -38,7 +42,12 @@
|
|||||||
"dashboard start": "dashboard start",
|
"dashboard start": "dashboard start",
|
||||||
"loaded plugins": "loaded plugins",
|
"loaded plugins": "loaded plugins",
|
||||||
"loading solc compiler": "loading solc compiler",
|
"loading solc compiler": "loading solc compiler",
|
||||||
|
"Cannot upload: {{platform}} node is not running on {{url}}.": "Cannot upload: {{platform}} node is not running on {{url}}.",
|
||||||
|
"http:// Cannot upload: {{platform}} node is not running on {{url}}.": "http:// Cannot upload: {{platform}} node is not running on {{url}}.",
|
||||||
|
"Cannot upload:": "Cannot upload:",
|
||||||
|
"node is not running on": "node is not running on",
|
||||||
"compiling solidity contracts": "compiling solidity contracts",
|
"compiling solidity contracts": "compiling solidity contracts",
|
||||||
|
"Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.": "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.",
|
||||||
"%s doesn't have a compatible contract compiler. Maybe a plugin exists for it.": "%s doesn't have a compatible contract compiler. Maybe a plugin exists for it.",
|
"%s doesn't have a compatible contract compiler. Maybe a plugin exists for it.": "%s doesn't have a compatible contract compiler. Maybe a plugin exists for it.",
|
||||||
"assuming %s to be an interface": "assuming %s to be an interface",
|
"assuming %s to be an interface": "assuming %s to be an interface",
|
||||||
"{{className}}: couldn't find instanceOf contract {{parentContractName}}": "{{className}}: couldn't find instanceOf contract {{parentContractName}}",
|
"{{className}}: couldn't find instanceOf contract {{parentContractName}}": "{{className}}: couldn't find instanceOf contract {{parentContractName}}",
|
||||||
@ -70,15 +79,15 @@
|
|||||||
"to immediatly exit (alias: exit)": "to immediatly exit (alias: exit)",
|
"to immediatly exit (alias: exit)": "to immediatly exit (alias: exit)",
|
||||||
"The web3 object and the interfaces for the deployed contracts and their methods are also available": "The web3 object and the interfaces for the deployed contracts and their methods are also available",
|
"The web3 object and the interfaces for the deployed contracts and their methods are also available": "The web3 object and the interfaces for the deployed contracts and their methods are also available",
|
||||||
"versions in use": "versions in use",
|
"versions in use": "versions in use",
|
||||||
"language to use (default: en)": "language to use (default: en)",
|
|
||||||
"executing": "executing",
|
"executing": "executing",
|
||||||
|
"finished deploying": "finished deploying",
|
||||||
"writing file": "writing file",
|
"writing file": "writing file",
|
||||||
"errors found while generating": "errors found while generating",
|
"errors found while generating": "errors found while generating",
|
||||||
|
"deploying to swarm!": "deploying to swarm!",
|
||||||
|
"adding %s to swarm": "adding %s to swarm",
|
||||||
|
"error uploading to swarm": "error uploading to swarm",
|
||||||
"Looking for documentation? You can find it at": "Looking for documentation? You can find it at",
|
"Looking for documentation? You can find it at": "Looking for documentation? You can find it at",
|
||||||
"Ready": "Ready",
|
"Ready": "Ready",
|
||||||
"Graph will not include undeployed contracts": "Graph will not include undeployed contracts",
|
|
||||||
"Graph will not include functions": "Graph will not include functions",
|
|
||||||
"Graph will not include events": "Graph will not include events",
|
|
||||||
"Embark Blockchain Using: %s": "Embark Blockchain Using: %s",
|
"Embark Blockchain Using: %s": "Embark Blockchain Using: %s",
|
||||||
"running: %s": "running: %s",
|
"running: %s": "running: %s",
|
||||||
"Initializing Embark Template....": "Initializing Embark Template....",
|
"Initializing Embark Template....": "Initializing Embark Template....",
|
||||||
|
@ -288,7 +288,7 @@ class Embark {
|
|||||||
resetCmd();
|
resetCmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
upload(platform, options) {
|
upload(options) {
|
||||||
|
|
||||||
this.context = options.context || [constants.contexts.upload, constants.contexts.build];
|
this.context = options.context || [constants.contexts.upload, constants.contexts.build];
|
||||||
|
|
||||||
@ -307,6 +307,8 @@ class Embark {
|
|||||||
});
|
});
|
||||||
engine.init();
|
engine.init();
|
||||||
|
|
||||||
|
let platform = engine.config.storageConfig.provider;
|
||||||
|
|
||||||
let cmdPlugin;
|
let cmdPlugin;
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
|
|
||||||
@ -334,7 +336,7 @@ class Embark {
|
|||||||
}
|
}
|
||||||
checkFn.fn(function (serviceCheckResult) {
|
checkFn.fn(function (serviceCheckResult) {
|
||||||
if (!serviceCheckResult.status || serviceCheckResult.status === 'off') {
|
if (!serviceCheckResult.status || serviceCheckResult.status === 'off') {
|
||||||
return callback({message: __('Cannot upload: {{platform}} node is not running on {{url}}.', {platform: platform, url: `http://${engine.config.storageConfig.host}:${engine.config.storageConfig.port}`})});
|
return callback({message: __('Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.', {platform: platform, protocol: engine.config.storageConfig.protocol, host: engine.config.storageConfig.host, port: engine.config.storageConfig.port})});
|
||||||
}
|
}
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user