embark-area-51/tasks/deploy.coffee

18 lines
672 B
CoffeeScript
Raw Normal View History

2015-05-24 12:48:43 +00:00
module.exports = (grunt) ->
web3 = require('web3')
readYaml = require('read-yaml');
grunt.registerTask "deploy_contracts", "deploy code", (env_) =>
env = env_ || "development"
contractFiles = grunt.file.expand(grunt.config.get("deploy.contracts"));
destFile = grunt.config.get("deploy.dest");
2015-05-24 12:48:43 +00:00
Embark = require('embark-framework')
2015-07-04 02:27:17 +00:00
Embark.init()
Embark.blockchainConfig.loadConfigFile('config/blockchain.yml')
Embark.contractsConfig.loadConfigFile('config/contracts.yml')
2015-07-07 10:51:03 +00:00
#abi = Embark.deployContracts(env, contractFiles, destFile)
2015-07-04 02:27:17 +00:00
abi = Embark.deployContracts(env, contractFiles, destFile)
grunt.file.write(destFile, abi);
2015-05-24 12:48:43 +00:00