Hello, I made a little script for automation for when I update my site on production, it is like:
============ update.sh ============echo "Connecting"
ssh -t -t prefix.myserver.com -lusername <<END_SCRIPT
echo "Activating the virtual environment..."
source ~/env/bin/activate
echo "Updating project from SVN..."
cd projectname
svn update
#echo "Collecting static files"
#PYTHONPATH=~/env/src/django python manage.py collectstatic
echo "Syncing DB"
PYTHONPATH=~/env/src/django python manage.py syncdb
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/groups.yaml
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/person.yaml
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/sites.yaml
~/init/projectname restart
exit
END_SCRIPT
echo "Done"
ssh -t -t prefix.myserver.com -lusername <<END_SCRIPT
echo "Activating the virtual environment..."
source ~/env/bin/activate
echo "Updating project from SVN..."
cd projectname
svn update
#echo "Collecting static files"
#PYTHONPATH=~/env/src/django python manage.py collectstatic
echo "Syncing DB"
PYTHONPATH=~/env/src/django python manage.py syncdb
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/groups.yaml
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/person.yaml
PYTHONPATH=~/env/src/django python manage.py loaddata people/fixtures/sites.yaml
~/init/projectname restart
exit
END_SCRIPT
echo "Done"
============ end update.sh ============
The problem is that, if I uncomment the collectstatic line, it pops the message:
"This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel:"
"This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel:"
When I answer yes, the script stops... is it possible to make it say yes by default?
Thanks!
Thanks!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment