I have a bash script in a cron job that does an SVN copy of trunk and names it ‘release-2011-08-15’ (for example). I then want to auto-deploy that release to my server.
I think the Capistrano option I’m looking for is :revision, but how can I update the deploy.rb file/tell Capistrano which revision to get from my cron job bash script?
Is there an easy way to find a line in a config file and either edit/replace it with the following?
set :revision, "release-2011-08-15"
Thanks a bunch,
MrB
First of all, it seems dangerous to me to do auto deployment from svn with cron. But if you’re sure that’s what you want you can to the search and replace with sed:
That will find a “set revision” line and replace it with a “set revision” line containing the date.
(I had to split it to use the RELDATE variable in the sed command. If you don’t need that, you can of course do it in one line: