| Copyright | © 2015-Present Stack Builders |
|---|---|
| License | MIT |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
System.Hapistrano.Types
Contents
Description
Type definitions for the Hapistrano tool.
Synopsis
- newtype Hapistrano a = Hapistrano {
- unHapistrano :: Config -> IO a
- newtype HapistranoException = HapistranoException (Failure, Maybe Release)
- data Failure = Failure Int (Maybe String)
- data Config = Config {
- configSshOptions :: !(Maybe SshOptions)
- configShellOptions :: !Shell
- configPrint :: !(OutputDest -> String -> IO ())
- data Source
- = GitRepository { }
- | LocalDirectory { }
- data Task = Task {}
- data ReleaseFormat
- data SshOptions = SshOptions {}
- data OutputDest
- data Release
- data TargetSystem
- data DeployState
- data Shell
- data Opts = Opts {}
- data Command
- data MaintenanceOptions
- mkRelease :: ReleaseFormat -> UTCTime -> Release
- releaseTime :: Release -> UTCTime
- renderRelease :: Release -> String
- parseRelease :: String -> Maybe Release
- fromMaybeReleaseFormat :: Maybe ReleaseFormat -> Maybe ReleaseFormat -> ReleaseFormat
- fromMaybeKeepReleases :: Maybe Natural -> Maybe Natural -> Natural
- toMaybePath :: Source -> Maybe (Path Abs Dir)
Documentation
newtype Hapistrano a Source #
Hapistrano monad.
Constructors
| Hapistrano | |
Fields
| |
Instances
newtype HapistranoException Source #
Hapistrano exception
Constructors
| HapistranoException (Failure, Maybe Release) |
Instances
| Exception HapistranoException Source # | |
Defined in System.Hapistrano.Types Methods toException :: HapistranoException -> SomeException # fromException :: SomeException -> Maybe HapistranoException # | |
| Show HapistranoException Source # | |
Defined in System.Hapistrano.Types Methods showsPrec :: Int -> HapistranoException -> ShowS # show :: HapistranoException -> String # showList :: [HapistranoException] -> ShowS # | |
Failure with status code and a message.
Hapistrano configuration options.
Constructors
| Config | |
Fields
| |
Instances
| MonadReader Config Hapistrano Source # | |
Defined in System.Hapistrano.Types Methods ask :: Hapistrano Config # local :: (Config -> Config) -> Hapistrano a -> Hapistrano a # reader :: (Config -> a) -> Hapistrano a # | |
The source of the repository. It can be from a version control provider like GitHub or a local directory.
Constructors
| GitRepository | |
Fields
| |
| LocalDirectory | |
Fields
| |
The records describes deployment task.
Constructors
| Task | |
Fields
| |
data ReleaseFormat Source #
Release format mode.
Constructors
| ReleaseShort | Standard release path following Capistrano's format |
| ReleaseLong | Long release path including picoseconds |
Instances
data SshOptions Source #
SSH options.
Constructors
| SshOptions | |
Instances
| Read SshOptions Source # | |
Defined in System.Hapistrano.Types Methods readsPrec :: Int -> ReadS SshOptions # readList :: ReadS [SshOptions] # readPrec :: ReadPrec SshOptions # readListPrec :: ReadPrec [SshOptions] # | |
| Show SshOptions Source # | |
Defined in System.Hapistrano.Types Methods showsPrec :: Int -> SshOptions -> ShowS # show :: SshOptions -> String # showList :: [SshOptions] -> ShowS # | |
| Eq SshOptions Source # | |
Defined in System.Hapistrano.Types | |
| Ord SshOptions Source # | |
Defined in System.Hapistrano.Types Methods compare :: SshOptions -> SshOptions -> Ordering # (<) :: SshOptions -> SshOptions -> Bool # (<=) :: SshOptions -> SshOptions -> Bool # (>) :: SshOptions -> SshOptions -> Bool # (>=) :: SshOptions -> SshOptions -> Bool # max :: SshOptions -> SshOptions -> SshOptions # min :: SshOptions -> SshOptions -> SshOptions # | |
data OutputDest Source #
Output destination.
Constructors
| StdoutDest | |
| StderrDest |
Instances
Release indentifier.
data TargetSystem Source #
Target's system where application will be deployed.
Instances
data DeployState Source #
State of the deployment after running hap deploy.
note: the Unknown value is not intended to be
written to the .hapistrano_deploy_state file; instead,
it's intended to represent whenever Hapistrano couldn't
get the information on the deployment state (e.g. the file is not present).
Instances
Current shells supported.
Command line options.
Constructors
| Opts | |
Fields | |
Command to execute and command-specific options.
Constructors
| Deploy (Maybe ReleaseFormat) (Maybe Natural) Bool | Deploy a new release (with timestamp format, how many releases to keep, and whether the failed releases except the latest one get deleted or not) |
| Rollback Natural | Rollback to Nth previous release |
| Maintenance MaintenanceOptions |
Types helpers
fromMaybeReleaseFormat :: Maybe ReleaseFormat -> Maybe ReleaseFormat -> ReleaseFormat Source #
Get release format based on the CLI and file configuration values.