# Finding the deployed revision with Capistrano

**URL:** <https://www.ruby-forum.com/t/finding-the-deployed-revision-with-capistrano/88299>\
**Category:** Deployment\
**Created:** [March 9, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/finding-the-deployed-revision-with-capistrano/88299 "2007-03-09T14:21:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [March 9, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/finding-the-deployed-revision-with-capistrano/88299/1 "2007-03-09T14:21:03Z")

</div>

Silly question.

Is there a cap command that tells me which revision of a code base is  
deployed to the target? Something like:

cap revision

I’d definitely like to check my code base revision in production  
before deploying.

---

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [March 9, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/finding-the-deployed-revision-with-capistrano/88299/2 "2007-03-09T15:59:30Z")

</div>

Hello,

Here’s how I’ve done it (in config/deploy.rb):

task :revision, :roles =\> :app do  
run %(tail -1 #{deploy\_to}/revisions.log)  
end

-tero

---

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [March 9, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/finding-the-deployed-revision-with-capistrano/88299/3 "2007-03-09T17:11:51Z")

</div>

Thank you very much. Excellent help!
