Add --skip-upload flag

Easier for testing stackage the executable/library itself.
This commit is contained in:
Chris Done 2014-12-31 19:44:41 +01:00
parent fb73435572
commit 1f2824540e
2 changed files with 9 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering)
-- | Flags passed in from the command line.
data BuildFlags = BuildFlags
{ bfEnableTests :: !Bool
, bfDoUpload :: !Bool
} deriving (Show)
data BuildType = Nightly | LTS BumpType
@ -182,7 +183,8 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do
}
performBuild pb >>= mapM_ putStrLn
finallyUpload settings man pb
when (bfDoUpload buildFlags) $
finallyUpload settings man pb
-- | The final part of the complete build process: uploading a bundle,
-- docs and a distro to hackage.

View File

@ -61,4 +61,9 @@ main =
not
(switch
(long "skip-tests" <>
help "Skip build and running the test suites"))
help "Skip build and running the test suites")) <*>
fmap
not
(switch
(long "skip-upload" <>
help "Skip uploading bundle, docs, etc."))