From 4220b46f07ce224213755b2b3b584e65150e3f73 Mon Sep 17 00:00:00 2001 From: CristhianMotoche Date: Mon, 20 Nov 2023 09:00:48 -0500 Subject: [PATCH] doc: Include docs for initConfig --- src/System/Hapistrano.hs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/System/Hapistrano.hs b/src/System/Hapistrano.hs index c3ab3e14..0e4110e1 100644 --- a/src/System/Hapistrano.hs +++ b/src/System/Hapistrano.hs @@ -51,18 +51,16 @@ import qualified Data.Yaml as Yaml import Numeric.Natural import Path import Path.IO +import qualified System.Directory as Directory +import System.Exit (exitFailure) +import qualified System.FilePath as FilePath import System.Hapistrano.Commands -import System.Hapistrano.Config ( BuildCommand (..) - , CopyThing (..) - , ExecutionMode (..) - , deployStateFilename - ) import qualified System.Hapistrano.Config as HC +import System.Hapistrano.Config (BuildCommand (..), CopyThing (..), + ExecutionMode (..), + deployStateFilename) import System.Hapistrano.Core import System.Hapistrano.Types -import qualified System.Directory as Directory -import System.Exit (exitFailure) -import qualified System.FilePath as FilePath import System.IO (stderr) import Text.Read (readMaybe) @@ -271,6 +269,9 @@ playScriptLocally cmds = }) $ forM_ cmds $ flip execWithInheritStdout Nothing +-- | Create a file with an initial config file by getting information from the +-- user. + initConfig :: IO String -> IO () initConfig getLine' = do configFilePath <- (FilePath. "hap.yml") <$> Directory.getCurrentDirectory