hapistrano 0.3.2.2 → 0.3.2.3
raw patch · 3 files changed
+22/−11 lines, 3 filesdep ~pathdep ~path-ioPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: path, path-io
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- hapistrano.cabal +6/−6
- src/System/Hapistrano.hs +12/−5
CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.3.2.3++* Allow path-io 1.3+ ## 0.3.2.2 * Allow optparse-applicative 0.14
hapistrano.cabal view
@@ -1,5 +1,5 @@ name: hapistrano-version: 0.3.2.2+version: 0.3.2.3 synopsis: A deployment library for Haskell applications description: .@@ -46,7 +46,7 @@ build-depends: base >= 4.6 && < 5.0 , filepath >= 1.2 && < 1.5 , mtl >= 2.0 && < 3.0- , path >= 0.5 && < 6.0+ , path >= 0.5 && < 0.7 , process >= 1.4 && < 1.5 , time >= 1.5 && < 1.8 , transformers >= 0.4 && < 0.6@@ -65,8 +65,8 @@ , base >= 4.6 && < 5.0 , hapistrano , optparse-applicative >= 0.11 && < 0.15- , path >= 0.5.8 && < 6.0- , path-io >= 1.2 && < 1.3+ , path >= 0.5 && < 0.7+ , path-io >= 1.2 && < 1.4 , stm >= 2.4 && < 2.5 , yaml >= 0.8 && < 0.9 if flag(dev)@@ -86,8 +86,8 @@ , hapistrano , hspec >= 2.0 && < 3.0 , mtl >= 2.0 && < 3.0- , path >= 0.5 && < 6.0- , path-io >= 1.2 && < 1.3+ , path >= 0.5 && < 0.7+ , path-io >= 1.2 && < 1.4 , process >= 1.4 && < 1.5 , temporary >= 1.1 && < 1.3 if flag(dev)
src/System/Hapistrano.hs view
@@ -8,7 +8,7 @@ -- Portability : portable -- -- A module for creating reliable deploy processes for Haskell applications.-+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-}@@ -63,8 +63,7 @@ pushReleaseWithoutVc :: Task -> Hapistrano Release pushReleaseWithoutVc Task {..} = do setupDirs taskDeployPath- release <- newRelease taskReleaseFormat- return release+ newRelease taskReleaseFormat -- | Create a file-token that will tell rollback function that this release -- should be considered successfully compiled\/completed.@@ -201,7 +200,7 @@ deployedReleases deployPath = do let rpath = releasesPath deployPath xs <- exec (Find 1 rpath :: Find Dir)- ps <- mapM (stripDir rpath) (filter (/= rpath) xs)+ ps <- stripDirs rpath (filter (/= rpath) xs) (return . sortBy (comparing Down) . mapMaybe parseRelease) (dropWhileEnd (== '/') . fromRelDir <$> ps) @@ -213,7 +212,7 @@ completedReleases deployPath = do let cpath = ctokensPath deployPath xs <- exec (Find 1 cpath :: Find File)- ps <- mapM (stripDir cpath) xs+ ps <- stripDirs cpath xs (return . sortBy (comparing Down) . mapMaybe parseRelease) (dropWhileEnd (== '/') . fromRelFile <$> ps) @@ -280,3 +279,11 @@ case parseRelFile rendered of Nothing -> failWith 1 (Just $ "Could not append path: " ++ rendered) Just rpath -> return (ctokensPath deployPath </> rpath)++stripDirs :: Path Abs Dir -> [Path Abs t] -> Hapistrano [Path Rel t]+stripDirs path =+#if MIN_VERSION_path(0,6,0)+ mapM (stripProperPrefix path)+#else+ mapM (stripDir path)+#endif