serokell-util-0.10.0: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.Version

Contents

Synopsis

Git revision

retrieveGitRev :: Q Exp Source #

Gets the git revision. For example, you can use it configuring CLI options:

versionOption = infoOption
    ("Git revision: " <> toString $(retrieveGitRev))
    (long "version" <> help "Show version")

You'll need -XTemplateHaskell.

Also note, that in order to see the latest git revision for the latest commit you should force recompilation of the file which contains $(retrieveGitRev).