From 5a3fc14c1a92b28423d1b64b64e12d0502a90219 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Sun, 16 Aug 2020 12:29:31 +0200 Subject: Move client to server --- server/lib/Uplcg/Version.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 server/lib/Uplcg/Version.hs (limited to 'server/lib/Uplcg/Version.hs') diff --git a/server/lib/Uplcg/Version.hs b/server/lib/Uplcg/Version.hs new file mode 100644 index 0000000..b718a10 --- /dev/null +++ b/server/lib/Uplcg/Version.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE TemplateHaskell #-} +module Uplcg.Version + ( version + ) where + +import Control.Monad.Trans (liftIO) +import Data.Version (showVersion) +import qualified Language.Haskell.TH as TH +import qualified Paths_uplcg +import System.Process (readProcess) + +version :: String +version = showVersion Paths_uplcg.version ++ " (" ++ + $(do + hash <- liftIO $ readProcess "git" ["rev-parse", "HEAD"] "" + pure . TH.LitE . TH.StringL $ take 8 hash) ++ + ")" -- cgit v1.2.3