check for out of date info files at end
This commit is contained in:
parent
bfa07a8a80
commit
e4d7358389
1 changed files with 12 additions and 0 deletions
|
@ -54,6 +54,18 @@ makeinfos = do
|
||||||
[ Param "annex"
|
[ Param "annex"
|
||||||
, Params "sync"
|
, Params "sync"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{- Check for out of date info files. -}
|
||||||
|
infos <- liftIO $ dirContentsRecursiveSkipping (/= "info") True (basedir </> "git-annex")
|
||||||
|
ds <- liftIO $ forM infos (readish <$$> readFile)
|
||||||
|
let dis = zip infos ds
|
||||||
|
let ood = filter (outofdate version) dis
|
||||||
|
unless (null ood) $
|
||||||
|
error $ "Some info files are out of date: " ++ show (map fst ood)
|
||||||
|
where
|
||||||
|
outofdate version (_, md) = case md of
|
||||||
|
Nothing -> True
|
||||||
|
Just d -> distributionVersion d /= version
|
||||||
|
|
||||||
getRepoDir :: IO FilePath
|
getRepoDir :: IO FilePath
|
||||||
getRepoDir = do
|
getRepoDir = do
|
||||||
|
|
Loading…
Add table
Reference in a new issue