hapistrano-0.2.1.2: A deployment library for Haskell applications

Safe HaskellSafe
LanguageHaskell2010

System.Hapistrano

Description

A module for easily creating reliable deploy processes for Haskell applications.

Synopsis

Documentation

data Config Source #

Config stuff that will be replaced by config file reading

Constructors

Config 

Fields

Instances

data ReleaseFormat Source #

Constructors

Short

Standard release path following Capistrano's format

Long

Long release path including picoseconds for testing or people seriously into continuous deployment

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.

currentPath Source #

Arguments

:: FilePath

The full path of the deploy folder root

-> FilePath

The full path to the current symlink

Returns the full path to the current symlink.

defaultSuccessHandler :: a -> ReaderT Config IO () Source #

Default method to run on deploy success.

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.

isReleaseString Source #

Arguments

:: 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.

pathToRelease Source #

Arguments

:: 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.

readCurrentLink Source #

Arguments

:: 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.

rollback Source #

Arguments

:: Hapistrano String

The current Release in the Hapistrano monad

Activates the previous detected release.

runRC Source #

Arguments

:: ((Int, String) -> ReaderT Config IO a)

Error handler

-> (a -> ReaderT Config IO a)

Success handler

-> Config

Hapistrano deployment configuration

-> Hapistrano a

The remote command to run

-> IO a 

Runs the deploy, along with an optional success or failure function.

runBuild :: Release -> Hapistrano Release Source #

Runs a build script if one is provided.