aboutsummaryrefslogtreecommitdiff
path: root/Build/Version.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-18 14:29:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-18 14:29:39 -0400
commitb1760c28680385280912644bf607575683d4b361 (patch)
treee387b8efd18e059653bdf517a97082683ddba738 /Build/Version.hs
parent0f73e109c6f4ff5a8b8f70a9c41ec69914254713 (diff)
add Build/BuildVersion, for use by autobuilders
Diffstat (limited to 'Build/Version.hs')
-rw-r--r--Build/Version.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Build/Version.hs b/Build/Version.hs
index 7ff2fe662..0bcb4a520 100644
--- a/Build/Version.hs
+++ b/Build/Version.hs
@@ -25,10 +25,10 @@ isReleaseBuild = isJust <$> catchMaybeIO (getEnv "RELEASE_BUILD")
-
- If git or a git repo is not available, or something goes wrong,
- or this is a release build, just use the version from the changelog. -}
-getVersion :: Test
+getVersion :: IO String
getVersion = do
changelogversion <- getChangelogVersion
- version <- ifM (isReleaseBuild)
+ ifM (isReleaseBuild)
( return changelogversion
, catchDefaultIO changelogversion $ do
let major = takeWhile (/= '.') changelogversion
@@ -40,7 +40,6 @@ getVersion = do
then return changelogversion
else return $ concat [ major, ".", autoversion ]
)
- return $ Config "packageversion" (StringConfig version)
getChangelogVersion :: IO String
getChangelogVersion = do