sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit cb9c7683e73381a4f4afc2a7b4f2de713b3d4555
parent 97d0625b615d973365dba427e3188e1c660e96d1
Author: Dan Callaghan <djc@djc.id.au>
Date:   Fri, 10 Jul 2020 18:50:12 +1000

add a suffix to the version to indicate when running from a git checkout

Diffstat:
M lib/sup/version.rb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/sup/version.rb b/lib/sup/version.rb
@@ -1,3 +1,12 @@
+def git_suffix
+  revision = `GIT_DIR=#{__dir__}/../../.git git rev-parse HEAD 2>/dev/null`
+  if revision.empty?
+    "-git-unknown"
+  else
+    "-git-#{revision[0..7]}"
+  end
+end
+
 module Redwood
-  VERSION = "0.22.1"
+  VERSION = "0.22.1#{git_suffix}"
 end