aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_general_controller.rb4
-rw-r--r--app/views/admin_general/debug.rhtml4
2 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index ae51e0923..0b7e9bec0 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -78,6 +78,10 @@ class AdminGeneralController < AdminController
end
def debug
+ @current_commit = `git log -1 --format="%H"`
+ @current_branch = `git branch | grep "\*" | awk '{print $2}'`
+ repo = `git remote show origin -n | grep Fetch | awk '{print $3}' | sed -re 's/.*:(.*).git/\\1/'`
+ @github_origin = "https://github.com/#{repo.strip}/tree/"
@request_env = request.env
end
end
diff --git a/app/views/admin_general/debug.rhtml b/app/views/admin_general/debug.rhtml
index b3b06085f..40fe33616 100644
--- a/app/views/admin_general/debug.rhtml
+++ b/app/views/admin_general/debug.rhtml
@@ -7,6 +7,10 @@
<h2>Version numbers</h2>
<p>
+Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %>
+<br>
+Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %>
+<br>
RUBY_VERSION <%=h RUBY_VERSION %>
<br>
Rails::VERSION::STRING <%=h Rails::VERSION::STRING%>