hapistrano 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+18/−15 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hapistrano.cabal +1/−1
- src/Hapistrano.hs +17/−14
hapistrano.cabal view
@@ -1,5 +1,5 @@ name: hapistrano-version: 0.1.0.1+version: 0.1.0.2 synopsis: A deployment library for Haskell applications description: Hapistrano makes it easy to reliably deploy Haskell applications.
src/Hapistrano.hs view
@@ -20,6 +20,8 @@ import Control.Lens (makeLenses, use, (^.), (.=)) import Control.Monad (unless)+import System.Exit (ExitCode(..), exitWith)+ import Control.Monad.IO.Class (MonadIO(liftIO)) import Control.Monad.Trans.State (StateT, evalStateT, get) import Control.Monad.Trans.Class (lift)@@ -59,6 +61,19 @@ type RC a = StateT HapistranoState (EitherT (Int, Maybe String) IO) a +-- | Does basic project setup for a project, including making sure+-- some directories exist, and pushing a new release directory with the+-- SHA1 or branch specified in the configuration.+pushRelease :: RC (Maybe String)+pushRelease = setupDirs >> ensureRepositoryPushed >> updateCacheRepo >>+ cleanReleases >> cloneToRelease >> setReleaseRevision++-- | Switches the current symlink to point to the release specified in+-- the configuration. Maybe used in either deploy or rollback cases.+activateRelease :: RC (Maybe String)+activateRelease = removeCurrentSymlink >> symlinkCurrent++ -- | Returns an initial state for the deploy. initialState :: Config -> HapistranoState initialState cfg = HapistranoState { _config = cfg@@ -79,13 +94,13 @@ (evalStateT remoteCmd initState) defaultErrorHandler :: (Int, Maybe String) -> IO ()-defaultErrorHandler _ = putStrLn "Deploy failed."+defaultErrorHandler _ =+ hPutStrLn stderr "Deploy failed." >> exitWith (ExitFailure 1) defaultSuccessHandler :: a -> IO () defaultSuccessHandler _ = putStrLn "Deploy completed successfully." - -- | Creates necessary directories for the hapistrano project. Should -- only need to run the first time the project is deployed on a given -- system.@@ -397,15 +412,3 @@ case sortBy (flip compare) rls of [] -> Nothing r:_ -> Just r---- | Does basic project setup for a project, including making sure--- some directories exist, and pushing a new release directory with the--- SHA1 or branch specified in the configuration.-pushRelease :: RC (Maybe String)-pushRelease = setupDirs >> ensureRepositoryPushed >> updateCacheRepo >>- cleanReleases >> cloneToRelease >> setReleaseRevision---- | Switches the current symlink to point to the release specified in--- the configuration. Maybe used in either deploy or rollback cases.-activateRelease :: RC (Maybe String)-activateRelease = removeCurrentSymlink >> symlinkCurrent