Skip to content
Browse files

Show the git SHA

This means you can trivially find out which version of the app you're looking at.
This makes Josh happy.
  • Loading branch information...
1 parent 2b9b2a5 commit 44f62b184c3e9d2f0cc9c13f5289a91dfee8006c @jamiecobbett jamiecobbett committed Jul 6, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 app/views/layouts/application.html.erb
  2. +6 −0 config/initializers/current_git_sha.rb
View
2 app/views/layouts/application.html.erb
@@ -50,7 +50,7 @@
<%= yield %>
<hr>
<footer>
- <p>&copy; GDS. <span class="pull-right">Panopticon version 2.0</span></p>
+ <p>&copy; GDS. <span class="pull-right">Panopticon release: <%= CURRENT_RELEASE_SHA %></span> </p>
</footer>
</section>
View
6 config/initializers/current_git_sha.rb
@@ -0,0 +1,6 @@
+revision = `cat #{Rails.root}/REVISION`.chomp
+if revision.blank?
+ CURRENT_RELEASE_SHA = "development"
+else
+ CURRENT_RELEASE_SHA = revision[0..10] # Just get the short SHA
+end

0 comments on commit 44f62b1

Please sign in to comment.
Something went wrong with that request. Please try again.