about summary refs log tree commit diff
path: root/app/presenters/instance_presenter.rb
diff options
context:
space:
mode:
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 3e85faa92..a0f1ebd0a 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -44,6 +44,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