specify env and config when deploying

This commit is contained in:
Iuri Matias 2015-07-22 08:30:32 -04:00
parent 60b39cd159
commit 7f4d4d6e49
1 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ var run = function(cmd) {
}
}
var deploy = function(embarkConfig) {
var deploy = function(env, embarkConfig) {
contractFiles = grunt.file.expand(embarkConfig.contracts);
destFile = embarkConfig.output
Embark.init()
@ -49,7 +49,7 @@ program.command('deploy [env]').description('deploy contracts').action(function(
run("grunt deploy_contracts:" + env);
}
else {
deploy();
deploy(env, embarkConfig);
}
});
@ -63,7 +63,7 @@ program.command('build [env]').description('build dapp').action(function(env_) {
run('grunt build:' + env);
}
else if (embarkConfig.type === "meteor") {
deploy();
deploy(env, embarkConfig);
run("meteor-build-client ./build -p ''");
}
});
@ -79,7 +79,7 @@ program.command('ipfs [env]').description('build dapp and make it available in i
run('grunt ipfs:' + env)
}
else if (embarkConfig.type === "meteor") {
deploy();
deploy(env, embarkConfig);
run("meteor-build-client ./build -p ''");
Embark.release.ipfs("build/")
}
@ -126,7 +126,7 @@ program.command('blockchain [env]').description('run blockchain').action(functio
Embark.contractsConfig.loadConfigFile(embarkConfig.contractsConfig)
//TODO: better with --exec, but need to fix console bug first
wrench.copyDirSyncRecursive(__dirname + "/../js", "/tmp", {forceDelete: true});
wrench.copyDirSyncRecursive(__dirname + "/../js", "/tmp/js", {forceDelete: true});
Embark.startBlockchain(env, true);
}