Skip to content

How to display the version tag and commit hash of the currently deployed source on the dashboard

Tobias Preuss edited this page Feb 14, 2014 · 2 revisions
ActiveAdmin.register_page "Dashboard" do

  menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }

  content :title => proc{ I18n.t("active_admin.dashboard") } do
    panel "ActiveAdmin" do
      para %(Currently deployed: #{`git describe --tags --abbrev=0`}, #{link_to(`git rev-parse --short HEAD`, "https://github.com/gregbell/active_admin/commit/#{`git rev-parse HEAD`}")}).html_safe
    end
      end
    end
  end
end
Clone this wiki locally