This commit is contained in:
VoR0220 2015-09-26 01:51:22 -05:00
commit 1a147ab01a
4 changed files with 19 additions and 8 deletions

View File

@ -29,7 +29,7 @@ var deploy = function(env, embarkConfig) {
} }
program program
.version('0.9.1') .version('0.9.3')
program.command('new [name]').description('New application').action(function(name) { program.command('new [name]').description('New application').action(function(name) {
if (name === undefined) { if (name === undefined) {

View File

@ -10,8 +10,8 @@
"license": "ISC", "license": "ISC",
"homepage": "", "homepage": "",
"devDependencies": { "devDependencies": {
"embark-framework": "^0.9.1", "embark-framework": "^0.9.3",
"grunt-embark": "^0.4.1", "grunt-embark": "^0.4.3",
"grunt-contrib-clean": "^0.6.0", "grunt-contrib-clean": "^0.6.0",
"grunt-contrib-coffee": "^0.13.0", "grunt-contrib-coffee": "^0.13.0",
"grunt-contrib-concat": "^0.5.1", "grunt-contrib-concat": "^0.5.1",

View File

@ -21,9 +21,20 @@ Compiler.prototype.init = function(env) {
}; };
Compiler.prototype.compile_solidity = function(contractFile) { Compiler.prototype.compile_solidity = function(contractFile) {
var cmd, result, output, json, compiled_object; var cmd, result, output, version, json, compiled_object;
cmd = "solc --input-file " + contractFile + " --combined-json bin,abi"; cmd = "solc --version";
result = exec(cmd, {silent: true});
output = result.output;
version = output.split('\n')[1].split(' ')[1].slice(0,5);
if (version == '0.1.1') {
cmd = "solc --input-file " + contractFile + " --combined-json binary,json-abi";
}
else {
cmd = "solc --input-file " + contractFile + " --combined-json bin,abi";
}
result = exec(cmd, {silent: true}); result = exec(cmd, {silent: true});
output = result.output; output = result.output;
@ -41,9 +52,9 @@ Compiler.prototype.compile_solidity = function(contractFile) {
var contract = json[className]; var contract = json[className];
compiled_object[className] = {}; compiled_object[className] = {};
compiled_object[className].code = contract.binary; compiled_object[className].code = contract.binary || contract.bin;
compiled_object[className].info = {}; compiled_object[className].info = {};
compiled_object[className].info.abiDefinition = JSON.parse(contract["abi"]); compiled_object[className].info.abiDefinition = JSON.parse(contract["abi"] || contract["json-abi"]);
} }
return compiled_object; return compiled_object;

View File

@ -1,6 +1,6 @@
{ {
"name": "embark-framework", "name": "embark-framework",
"version": "0.9.1", "version": "0.9.3",
"description": "", "description": "",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"