From 543cba90f6efba8508d2feb3377b1a9f5f428c1a Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sun, 24 Mar 2013 21:47:05 +0100 Subject: Allow overriding the `deploy` command with Haskell code By overriding `deploySite` with a `Configuration -> IO ()` code, the user can execute Haskell code to deploy the site rather than shell code. The default behaviour honors the `deployCommand` configuration field and is backward compatible. --- src/Hakyll/Commands.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Hakyll/Commands.hs') diff --git a/src/Hakyll/Commands.hs b/src/Hakyll/Commands.hs index 4c60783..6e0b9f2 100644 --- a/src/Hakyll/Commands.hs +++ b/src/Hakyll/Commands.hs @@ -14,7 +14,6 @@ module Hakyll.Commands -------------------------------------------------------------------------------- import System.Exit (ExitCode (ExitSuccess), exitWith) -import System.Process (system) -------------------------------------------------------------------------------- @@ -109,9 +108,7 @@ server _ _ = previewServerDisabled -------------------------------------------------------------------------------- -- | Upload the site deploy :: Configuration -> IO () -deploy conf = do - _ <- system $ deployCommand conf - return () +deploy conf = deploySite conf conf -------------------------------------------------------------------------------- -- cgit v1.2.3