summaryrefslogtreecommitdiff
path: root/src/Version.hs
blob: 6679ae12089a0bd3be40c74a2010b88475bba712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE TemplateHaskell #-}


module Version ( version ) where

import           Control.Monad.Trans (liftIO)
import qualified Language.Haskell.TH as TH
import           System.Process      (readProcess)

version :: String
version = "walint rc3 2021 (" <>
    $(do
        hash <- liftIO $ readProcess "git" ["rev-parse", "HEAD"] ""
        pure . TH.LitE . TH.StringL $ take 40 hash) ++
    ")"