Today I’ve created new gem for automate generation of project version.
For example if you have the several clients with standalone installation of your project and you are planning to check versions of the app and make deployments. You can add to the deployment tasks version file builder and then access to this file through public folder. Also I added some common rake tasks for automation.
If you are using Rails 2 you can add to your Rakefile.
Now we can create a custom deploy task for capistrano like that:
before 'deploy' do
after 'deploy' do
It will create a minor version of the project(new tag), make ‘git push —tags origin master’, generate new version.txt file in the public folder after deployment.