Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Commit

Permalink
Show the git SHA
Browse files Browse the repository at this point in the history
This means you can trivially find out which version of the app you're looking at.
This makes Josh happy.
  • Loading branch information
jamiecobbett committed Jul 6, 2012
1 parent 2b9b2a5 commit 44f62b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -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>

Expand Down
6 changes: 6 additions & 0 deletions 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.