summaryrefslogtreecommitdiff
path: root/src/Version.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Version.hs')
-rw-r--r--src/Version.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Version.hs b/src/Version.hs
new file mode 100644
index 0000000..cca3c6d
--- /dev/null
+++ b/src/Version.hs
@@ -0,0 +1,16 @@
+module Version (
+ versionLine,
+) where
+
+import Paths_erebos_webapp (version)
+import Data.Version (showVersion)
+import Version.Git
+
+{-# NOINLINE versionLine #-}
+versionLine :: String
+versionLine = do
+ let ver = case gitVersion of
+ Just gver
+ -> "git " <> gver
+ _ -> "v" <> showVersion version
+ in ver