packages feed

bumper 0.5.0.1 → 0.5.0.2

raw patch · 3 files changed

+11/−3 lines, 3 filesnew-uploader

Files

bumper.cabal view
@@ -1,5 +1,5 @@ Name:             bumper-Version:          0.5.0.1+Version:          0.5.0.2 Synopsis:         Automatically bump package versions, also transitively. Description:      Automatically bump package versions, also transitively. Author:           Silk
src/Bumper.hs view
@@ -1,8 +1,10 @@ module Main where  import Config+import Control.Monad import Data.Label import Data.List+import Data.Maybe import Data.Version import Distribution.Package hiding (Package) import Distribution.Text@@ -30,6 +32,12 @@ run conf act =   do -- Load packages      ps   <- packages++     --Check for non-existent packages+     let changePks = map fst (get setVersion conf) ++ concat (M.elems (get bump conf))+         notFound = filter (not . isJust . flip lookupPackage ps) changePks+     when (not $ null notFound) $ putStrLn $ "[Warning] packages not found: " ++ (intercalate "," $ map display notFound)+      -- Retrieve base versions      base <- maybe (return ps) (flip getBaseVersions ps) $ get global conf      let changed = (if get transitive conf then trans base else id)
src/Package.hs view
@@ -92,9 +92,9 @@ modifyDependency :: Dependency -> String -> String modifyDependency (Dependency nm range) s = subRegex (mkRegexWithOpts regex False False) s result   where regex = "(build-depends" ++ whiteReg ++ ":" ++ "[^:]*"-              ++ "[ ,\n\t]" ++ display nm ++ whiteReg ++ ")[, ]([" ++ rangeChar ++ " \t\n]*[" ++ rangeChar ++ "])"+              ++ "[ ,\n\t]" ++ display nm ++ whiteReg ++ ")([" ++ rangeChar ++ " \t\n]*[" ++ rangeChar ++ "])"         rangeChar = "0-9.*&|()<>="-        result = "\\1 " ++ printRange range+        result = "\\1" ++ printRange range  -- | Data structure containing package modifications type PackageChanges = (Maybe Version, [Dependency])