Created
May 18, 2010 23:26
-
-
Save danielpietzsch/405717 to your computer and use it in GitHub Desktop.
A view partial you can include to display the first 8 chars of the deployed git commit. Capistrano creates the REVISION file. Maybe you need to adjust the relative path here, depending on where you store this partial.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% number = File.read(File.dirname(__FILE__) + "/../../../REVISION").strip[0..7] if File.exists?(File.dirname(__FILE__) + "/../../../REVISION") %> | |
Commit: <%= number || "CURRENT" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment