Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A module for easily creating reliable deploy processes for Haskell applications.
- data Config = Config {}
- data ReleaseFormat
- activateRelease :: Release -> Hapistrano String
- currentPath :: FilePath -> FilePath
- defaultSuccessHandler :: a -> ReaderT Config IO ()
- defaultErrorHandler :: FailureResult -> ReaderT Config IO ()
- directoryExists :: Maybe String -> FilePath -> IO Bool
- isReleaseString :: ReleaseFormat -> String -> Bool
- pathToRelease :: FilePath -> Release
- pushRelease :: Hapistrano Release
- readCurrentLink :: Hapistrano FilePath
- restartServerCommand :: Hapistrano String
- rollback :: Hapistrano String
- runRC :: ((Int, String) -> ReaderT Config IO a) -> (a -> ReaderT Config IO a) -> Config -> Hapistrano a -> IO a
- runBuild :: Release -> Hapistrano Release
Documentation
Config stuff that will be replaced by config file reading
Config | |
|
data ReleaseFormat Source #
activateRelease :: Release -> Hapistrano String Source #
Switches the current symlink to point to the release specified in the configuration. Maybe used in either deploy or rollback cases.
Returns the full path to the current symlink.
defaultErrorHandler :: FailureResult -> ReaderT Config IO () Source #
Default method to run on deploy failure. Emits a failure message and exits with a status code of 1.
:: ReleaseFormat | Format of Release directories |
-> String | String to check against Release format |
-> Bool | Whether the given String adheres to the specified Release format |
Returns a Bool indicating if the given String is in the proper release format.
:: FilePath | The entire FilePath to a Release directory |
-> Release | The Release number. |
Take the release timestamp from the end of a filepath.
pushRelease :: Hapistrano Release Source #
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.
:: Hapistrano FilePath | The target of the symlink in the Hapistrano monad |
Trims any newlines from the given String
Returns the FilePath pointed to by the current symlink.
restartServerCommand :: Hapistrano String Source #
Runs a command to restart a server if a command is provided.
:: Hapistrano String | The current Release in the Hapistrano monad |
Activates the previous detected release.