mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-12-25 12:33:16 +03:00
Loose constraint for path-io
This commit is contained in:
parent
d5f56a0675
commit
ff2d5eb76d
@ -1,3 +1,7 @@
|
||||
## 0.3.2.3
|
||||
|
||||
* Allow path-io 1.3
|
||||
|
||||
## 0.3.2.2
|
||||
|
||||
* Allow optparse-applicative 0.14
|
||||
|
@ -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 @@ library
|
||||
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 @@ executable hap
|
||||
, 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 @@ test-suite test
|
||||
, 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)
|
||||
|
@ -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 @@ pushRelease Task {..} = do
|
||||
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
|
||||
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
|
||||
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 @@ ctokenPath deployPath release = do
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user