summaryrefslogtreecommitdiff
path: root/Build/DistributionUpdate.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-10 15:28:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-10 15:28:00 -0400
commit13f8e313213afe3ed1571a0dc289cf2fda840e0b (patch)
tree3b0342640ba7c3e6c75374a334f21cf56f0d48ea /Build/DistributionUpdate.hs
parentcc507ab7d7d3a2ae87ac7ddb431366c885c8e2e1 (diff)
check for out of date info files at end
Diffstat (limited to 'Build/DistributionUpdate.hs')
-rw-r--r--Build/DistributionUpdate.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs
index 0e7fa7304..ba0e9844a 100644
--- a/Build/DistributionUpdate.hs
+++ b/Build/DistributionUpdate.hs
@@ -54,6 +54,18 @@ makeinfos = do
[ Param "annex"
, 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 = do