From d5c7bf3133cd68b28bf3f4bfbad6add00449456e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 10 Jun 2015 08:37:14 -0400 Subject: [PATCH] fix issue with choosing environment --- bin/embark | 9 +++++++-- tasks/tasks.coffee | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/embark b/bin/embark index 5accf53d..53bcad19 100644 --- a/bin/embark +++ b/bin/embark @@ -30,12 +30,17 @@ program.command('deploy [env]').description('deploy contracts').action(function( program.command('build [env]').description('build dapp').action(function(env_) { var env = env_ || 'development'; + exec("grunt clean"); + exec("grunt deploy_contracts:" + env); exec('grunt build:' + env); }); -program.command('release ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) { +program.command('ipfs [env]').description('build dapp and make it available in ipfs').action(function(env_) { var env = env_ || 'development'; - exec('grunt release_ipfs:' + env); + if (exec("grunt clean").code != 0) { exit(); } + if (exec("grunt deploy_contracts:" + env).code != 0) { exit(); } + if (exec('grunt build:' + env).code != 0) { exit(); } + if (exec('grunt ipfs:' + env).code != 0) { exit(); } }); program.command('run [env]').description('run dapp').action(function(env_) { diff --git a/tasks/tasks.coffee b/tasks/tasks.coffee index 8c1e9c8e..209bafa2 100644 --- a/tasks/tasks.coffee +++ b/tasks/tasks.coffee @@ -2,5 +2,4 @@ module.exports = (grunt) -> grunt.registerTask "deploy", ["coffee", "deploy_contracts", "concat", "copy", "server", "watch"] grunt.registerTask "build", ["clean", "deploy_contracts", "coffee", "concat", "uglify", "copy"] - grunt.registerTask "release_ipfs", ["build", "ipfs"]