mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-12 15:28:29 +01:00
Add --skip-haddock -flag
This commit is contained in:
parent
ba37f69666
commit
4312df025f
@ -33,6 +33,7 @@ import System.IO (BufferMode (LineBuffering), hSetBuffering)
|
||||
-- | Flags passed in from the command line.
|
||||
data BuildFlags = BuildFlags
|
||||
{ bfEnableTests :: !Bool
|
||||
, bfEnableHaddock :: !Bool
|
||||
, bfDoUpload :: !Bool
|
||||
, bfEnableLibProfile :: !Bool
|
||||
, bfVerbose :: !Bool
|
||||
@ -203,6 +204,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild
|
||||
, pbJobs = 8
|
||||
, pbGlobalInstall = False
|
||||
, pbEnableTests = bfEnableTests buildFlags
|
||||
, pbEnableHaddock = bfEnableHaddock buildFlags
|
||||
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
|
||||
, pbVerbose = bfVerbose buildFlags
|
||||
, pbAllowNewer = bfSkipCheck buildFlags
|
||||
|
||||
@ -28,6 +28,7 @@ data InstallFlags = InstallFlags
|
||||
, ifJobs :: !Int
|
||||
, ifGlobalInstall :: !Bool
|
||||
, ifEnableTests :: !Bool
|
||||
, ifEnableHaddock :: !Bool
|
||||
, ifEnableLibProfiling :: !Bool
|
||||
, ifVerbose :: !Bool
|
||||
, ifSkipCheck :: !Bool
|
||||
@ -48,6 +49,7 @@ getPerformBuild plan InstallFlags{..} =
|
||||
, pbJobs = ifJobs
|
||||
, pbGlobalInstall = ifGlobalInstall
|
||||
, pbEnableTests = ifEnableTests
|
||||
, pbEnableHaddock = ifEnableHaddock
|
||||
, pbEnableLibProfiling = ifEnableLibProfiling
|
||||
, pbVerbose = ifVerbose
|
||||
, pbAllowNewer = ifSkipCheck
|
||||
|
||||
@ -62,6 +62,7 @@ data PerformBuild = PerformBuild
|
||||
, pbGlobalInstall :: Bool
|
||||
-- ^ Register packages in the global database
|
||||
, pbEnableTests :: Bool
|
||||
, pbEnableHaddock :: Bool
|
||||
, pbEnableLibProfiling :: Bool
|
||||
, pbVerbose :: Bool
|
||||
, pbAllowNewer :: Bool
|
||||
@ -354,7 +355,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
|
||||
-- dependency's haddocks before this finishes
|
||||
atomically $ putTMVar (piResult sbPackageInfo) True
|
||||
|
||||
when (pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do
|
||||
when (pbEnableHaddock && pcHaddocks /= Don'tBuild && not (null $ sdModules $ ppDesc $ piPlan sbPackageInfo)) $ do
|
||||
log' $ "Haddocks " ++ namever
|
||||
hfs <- readTVarIO sbHaddockFiles
|
||||
let hfsOpts = flip map (mapToList hfs) $ \(pkgVer, hf) -> concat
|
||||
|
||||
@ -77,6 +77,11 @@ main =
|
||||
(switch
|
||||
(long "skip-tests" <>
|
||||
help "Skip build and running the test suites")) <*>
|
||||
fmap
|
||||
not
|
||||
(switch
|
||||
(long "skip-haddock" <>
|
||||
help "Skip generating haddock documentation")) <*>
|
||||
fmap
|
||||
not
|
||||
(switch
|
||||
@ -136,6 +141,11 @@ main =
|
||||
(switch
|
||||
(long "skip-tests" <>
|
||||
help "Skip build and running the test suites")) <*>
|
||||
fmap
|
||||
not
|
||||
(switch
|
||||
(long "skip-haddock" <>
|
||||
help "Skip generating haddock documentation")) <*>
|
||||
switch
|
||||
(long "enable-library-profiling" <>
|
||||
help "Enable profiling when building") <*>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user