fix issue with choosing environment

This commit is contained in:
Iuri Matias 2015-06-10 08:37:14 -04:00
parent 1913a38341
commit d5c7bf3133
2 changed files with 7 additions and 3 deletions

View File

@ -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_) {

View File

@ -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"]