diff --git a/bin/embark b/bin/embark index f9141ca09..f633663eb 100755 --- a/bin/embark +++ b/bin/embark @@ -29,7 +29,7 @@ var deploy = function(env, embarkConfig) { } program - .version('0.9.1') + .version('0.9.3') program.command('new [name]').description('New application').action(function(name) { if (name === undefined) { diff --git a/boilerplate/package.json b/boilerplate/package.json index c72350702..e82b7d0f2 100644 --- a/boilerplate/package.json +++ b/boilerplate/package.json @@ -10,8 +10,8 @@ "license": "ISC", "homepage": "", "devDependencies": { - "embark-framework": "^0.9.1", - "grunt-embark": "^0.4.1", + "embark-framework": "^0.9.3", + "grunt-embark": "^0.4.3", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-coffee": "^0.13.0", "grunt-contrib-concat": "^0.5.1", diff --git a/lib/compiler.js b/lib/compiler.js index 4fc60bf46..2006fd57a 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -21,9 +21,20 @@ Compiler.prototype.init = function(env) { }; 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}); output = result.output; @@ -41,9 +52,9 @@ Compiler.prototype.compile_solidity = function(contractFile) { var contract = json[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.abiDefinition = JSON.parse(contract["abi"]); + compiled_object[className].info.abiDefinition = JSON.parse(contract["abi"] || contract["json-abi"]); } return compiled_object; diff --git a/package.json b/package.json index 2f8517ca4..0987a62a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "embark-framework", - "version": "0.9.1", + "version": "0.9.3", "description": "", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"