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.
This commit is contained in:
parent
08f1f7a697
commit
5b478722da
4 changed files with 82 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue