Skip to content

Commit

Permalink
Add last update date app in footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
axilleas committed Aug 1, 2014
1 parent 308c5a5 commit 44c74f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/views/layouts/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
= Git::VERSION
@
%small
= link_to Git::REVISION,
"https://github.com/axilleas/isitfedoraruby/commit/#{Git::REVISION}"
= succeed '-' do
= link_to "#{Git::REVISION} ",
"https://github.com/axilleas/isitfedoraruby/commit/#{Git::REVISION}"
%small
= precede '-' do
App last updated
= Git::DATE
%nav
%ul
%li= link_to _('Contact'), contact_path
1 change: 1 addition & 0 deletions config/initializers/app_version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module Git
REVISION = `SHA1=$(git rev-parse --short HEAD 2> /dev/null); if [ $SHA1 ]; then echo $SHA1; else echo 'unknown'; fi`.chomp
VERSION = File.exists?(File.join(Rails.root, 'VERSION')) ? File.open(File.join(Rails.root, 'VERSION'), 'r') { |f| GIT_VERSION = f.gets.chomp } : nil
DATE = `git show -s --format=%ci HEAD`.chomp
end

0 comments on commit 44c74f6

Please sign in to comment.