Select Git revision
test_role.py
Forked from
uffd / uffd
Source project has a limited visibility.
Version.hs 450 B
{-# LANGUAGE TemplateHaskell #-}
module Version ( version ) where
import Universum
import qualified Language.Haskell.TH as TH
import System.Process (readProcess)
version :: String
version = "walint divoc bb3 2022 (" <>
$(do
hash <- liftIO $ catchAny (readProcess "git" ["rev-parse", "HEAD"] "")
(\_ -> pure "[unknown]")
pure . TH.LitE . TH.StringL $ take 40 hash) ++
")"