Based on the background of the JS / Node development, I like to use Grunt for my automation. For a recent project, I took the child Django to understand how it works, but still wanted to integrate Grunt for my workflow.
I am currently running my Django server through Grunt using the spawn-shell module. This works fine, but I also use the virtualenv setup, and would also like to start this through Grunt.
The command that I run to start the virtual environment is:
source ./venv/bin/activate
Which works fine from the command line of the terminal, as it is. However, executing this command from the grunt or grunt exec command line does nothing. I get no errors from Grunt (it says it works and then runs without errors), but nothing starts.
The grunt exec command looks like this:
exec: {
start: {
cmd: function() {
return "source ./venv/bin/activate";
}
}
}
And shell command:
shell: {
start: {
command: 'source ./venv/bin/activate',
options: {
stdout: true
}
}
}
Any ideas on how to make this work? Or is this not possible, and should I just resort to entering the command manually at startup?
source
share