Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- retrieveGitRev :: Q Exp
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)
.