308cd1383c
This avoids warnings from stack about the module not being listed in the cabal file. So, the generated file is also renamed to Build/SysConfig. Note that the setup program seems to be cached despite these changes; I had to cabal clean to get cabal to update it so that Build/SysConfig was written. This commit was sponsored by Jochen Bartl on Patreon.
21 lines
575 B
Haskell
21 lines
575 B
Haskell
{- git build version
|
|
-
|
|
- Copyright 2011 Joey Hess <id@joeyh.name>
|
|
-
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
-}
|
|
|
|
module Git.BuildVersion where
|
|
|
|
import Git.Version
|
|
import qualified BuildInfo
|
|
|
|
{- Using the version it was configured for avoids running git to check its
|
|
- version, at the cost that upgrading git won't be noticed.
|
|
- This is only acceptable because it's rare that git's version influences
|
|
- code's behavior. -}
|
|
buildVersion :: GitVersion
|
|
buildVersion = normalize BuildInfo.gitversion
|
|
|
|
older :: String -> Bool
|
|
older n = buildVersion < normalize n
|