about summary refs log tree commit diff
path: root/app/presenters/instance_presenter.rb
diff options
context:
space:
mode:
authorSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
committerSurinna Curtis <ekiru.0@gmail.com>2017-11-16 01:21:16 -0600
commit35fbdc36f92b610e8a73e2acb220e87cf5fc83b0 (patch)
treefcd9bdb5ba49ab7a6a79590c74db858ae77b4239 /app/presenters/instance_presenter.rb
parent30237259367a0ef2b20908518b86bbeb358999b5 (diff)
parent88627fd7aa2493a6890d60a5965459e4c7fe6fe9 (diff)
Merge tootsuite/master at 30237259367a0ef2b20908518b86bbeb358999b5
Diffstat (limited to 'app/presenters/instance_presenter.rb')
-rw-r--r--app/presenters/instance_presenter.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb
index 4c1124d59..1c08fb3bc 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -32,6 +32,15 @@ class InstancePresenter
     Mastodon::Version
   end
 
+  def commit_hash
+    current_release_file = Pathname.new('CURRENT_RELEASE').expand_path
+    if current_release_file.file?
+      IO.read(current_release_file).strip!
+    else
+      ''
+    end
+  end
+
   def source_url
     Mastodon::Version.source_url
   end