diff options
author | 2014-06-18 15:21:29 -0400 | |
---|---|---|
committer | 2014-06-18 15:24:18 -0400 | |
commit | bb83e52e4bc30f86f7901407cd08820deb848285 (patch) | |
tree | c001d2828d22898abdfb949e3c87be680206e238 /Build/Version.hs | |
parent | afd727203041bf2565fff2b7de7e5ccea21151bc (diff) |
make DistributionUpdate download build-version files and use them in the info files
Also automated downloading the builds, finally. I had done it by hand until
now.
Note that the Windows autobuilder has an expired cert, so it will refuse to
download from it currently. I have emailed its admin to get that fixed,
hopefully.
This commit was sponsored by Peter Hogg.
Diffstat (limited to 'Build/Version.hs')
-rw-r--r-- | Build/Version.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/Version.hs b/Build/Version.hs index 0bcb4a520..71836a17b 100644 --- a/Build/Version.hs +++ b/Build/Version.hs @@ -14,6 +14,8 @@ import Build.TestConfig import Utility.Monad import Utility.Exception +type Version = String + {- Set when making an official release. (Distribution vendors should set - this too.) -} isReleaseBuild :: IO Bool @@ -25,7 +27,7 @@ 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 :: IO String +getVersion :: IO Version getVersion = do changelogversion <- getChangelogVersion ifM (isReleaseBuild) @@ -41,7 +43,7 @@ getVersion = do else return $ concat [ major, ".", autoversion ] ) -getChangelogVersion :: IO String +getChangelogVersion :: IO Version getChangelogVersion = do changelog <- readFile "debian/changelog" let verline = takeWhile (/= '\n') changelog |