blob: 2ec1537af630972855f724f425153172d2ef856f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE TemplateHaskell #-}
module Version ( version ) where
import Universum
import qualified Language.Haskell.TH as TH
import System.Process (readProcess)
version :: String
version = "walint rc3 2021 (" <>
$(do
hash <- liftIO $ catchAny (readProcess "git" ["rev-parse", "HEAD"] "")
(\_ -> pure "[unknown]")
pure . TH.LitE . TH.StringL $ take 40 hash) ++
")"
|