To get some more insight into the different code applications deployed to different servers (e.g. staging, acceptance production) I wanted to be able to see the version hash and deploy date in a small file that gets deployed with the application.
I found out about the version routine in the capistrano-helpers repository by @westarete, which prints the currently deployed git hash to a VERSION file. I’ve adjusted the code slightly to create a nice json formatted file which includes both the git hash and the deploydate.
I use the resulting version file to remotely retrieve the servers version for our status dashboard, which is pretty neat and gives you a quick overview of your servers statuses.