|
@@ -3,12 +3,13 @@ module.exports = function(grunt) {
|
|
|
|
|
|
sshServer = 'ipepdvcompute3.ipe.kit.edu';
|
|
|
username = 'visualization';
|
|
|
+ tarName = '<%= pkg.name %>.tar';
|
|
|
|
|
|
deployCommand = function(env) {
|
|
|
var command = 'ssh ' + username + '@' + sshServer
|
|
|
+ ' "cd /usr/local/www/;'
|
|
|
+ 'rm -rf <%= pkg.name %>;'
|
|
|
- + 'tar -xf <%= pkg.name %>.tar;'
|
|
|
+ + 'tar -xf ' + tarName + ';'
|
|
|
+ 'cp -r <%= pkg.name %>/* <%= pkg.name %>-' + env + '/;"';
|
|
|
return command;
|
|
|
}
|
|
@@ -27,13 +28,13 @@ module.exports = function(grunt) {
|
|
|
|
|
|
shell: {
|
|
|
pkg: {
|
|
|
- command: 'tar -cf ../<%= pkg.name %>.tar ../<%= pkg.name %>/* --exclude=settings_env.py --exclude=node_modules --exclude=__pycache__ --exclude=Gruntfile.js --exclude=startDev.sh --exclude=manage.py'
|
|
|
+ command: 'tar -cf ' + tarName + ' ../<%= pkg.name %>/* --exclude=settings_env.py --exclude=node_modules --exclude=__pycache__ --exclude=Gruntfile.js --exclude=startDev.sh --exclude=manage.py'
|
|
|
},
|
|
|
rmPkg: {
|
|
|
- command: 'rm ../<%= pkg.name %>.tar'
|
|
|
+ command: 'rm ' + tarName
|
|
|
},
|
|
|
scp: {
|
|
|
- command: 'scp ../<%= pkg.name %>.tar visualization@ipepdvcompute3.ipe.kit.edu:/usr/local/www/'
|
|
|
+ command: 'scp ' + tarName + ' visualization@ipepdvcompute3.ipe.kit.edu:/usr/local/www/'
|
|
|
},
|
|
|
deployStaging: {
|
|
|
command: deployCommand('staging')
|