I’m working in local branch and want to try my changes on staging server, but I don’t want to commit these changes. Can I commit local changes.
I know about deploy:upload recipe. I need a way to deploy several files or whole working derictory.
Thanks.
Most important of capistrano is to allow execute code on remote server, what we call deploy is a set of default scripts that do a lot of small tasks required for setting up new version of application on server.
So it is possible to write your own scrip that will execute following script (it’s not working probably):
pack sources
system "tar -czf /tmp/package.tgz *"
upload it to server
upload "/tmp/package.tgz" "/tmp/package.tgz"
remove old files, unpack sources on server
run "cd /app_path/; rm -rf *; tar -xzf /tmp/package.tgz"
override (force recursively symlinks) files with some server configs … like database.yml
run "cp -flrs /app_shared_path/* /app_path/"
restart application – this is for passenger, use your own server command for restart
run "cd /app_path/; touch tmp/restart.txt"
I did similar setup once for deployment – before I got access to git.