skip-check option to nightly (good for 7.10 builds)

This commit is contained in:
Michael Snoyman 2015-01-07 17:10:49 +02:00
parent fb5e40a605
commit 548578c16b
5 changed files with 17 additions and 5 deletions

View File

@ -1,7 +1,8 @@
## 0.4.1
## 0.5.0
* Print "Still Alive" while checking, to avoid Travis timeouts
* Include `stackage upload-nightly` command
* Optional plan checking
## 0.4.0

View File

@ -35,6 +35,7 @@ data BuildFlags = BuildFlags
, bfDoUpload :: !Bool
, bfEnableLibProfile :: !Bool
, bfVerbose :: !Bool
, bfSkipCheck :: !Bool
} deriving (Show)
data BuildType = Nightly | LTS BumpType
@ -200,6 +201,7 @@ getPerformBuild buildFlags Settings {..} = PerformBuild
, pbEnableTests = bfEnableTests buildFlags
, pbEnableLibProfiling = bfEnableLibProfile buildFlags
, pbVerbose = bfVerbose buildFlags
, pbAllowNewer = bfSkipCheck buildFlags
}
-- | Make a complete plan, build, test and upload bundle, docs and
@ -214,8 +216,11 @@ completeBuild buildType buildFlags = withManager tlsManagerSettings $ \man -> do
putStrLn $ "Writing build plan to: " ++ fpToText planFile
encodeFile (fpToString planFile) plan
putStrLn "Checking build plan"
checkBuildPlan plan
if bfSkipCheck buildFlags
then putStrLn "Skipping build plan check"
else do
putStrLn "Checking build plan"
checkBuildPlan plan
putStrLn "Performing build"
performBuild (getPerformBuild buildFlags settings) >>= mapM_ putStrLn

View File

@ -64,6 +64,8 @@ data PerformBuild = PerformBuild
, pbEnableTests :: Bool
, pbEnableLibProfiling :: Bool
, pbVerbose :: Bool
, pbAllowNewer :: Bool
-- ^ Pass --allow-newer to cabal configure
}
data PackageInfo = PackageInfo
@ -293,6 +295,7 @@ singleBuild pb@PerformBuild {..} SingleBuild {..} =
withBinaryFile (fpToString fp) WriteMode inner'
configArgs = ($ []) $ execWriter $ do
when pbAllowNewer $ tell' "--allow-newer"
tell' "--package-db=clear"
tell' "--package-db=global"
forM_ (pbDatabase pb) $ \db -> tell' $ "--package-db=" ++ fpToText db

View File

@ -78,7 +78,10 @@ main =
help "Enable profiling when building") <*>
switch
(long "verbose" <> short 'v' <>
help "Output verbose detail about the build steps")
help "Output verbose detail about the build steps") <*>
switch
(long "skip-check" <>
help "Skip the check phase, and pass --allow-newer to cabal configure")
nightlyUploadFlags = fromString <$> strArgument
(metavar "DATE" <>

View File

@ -1,5 +1,5 @@
name: stackage
version: 0.4.1
version: 0.5.0
synopsis: "Stable Hackage," tools for creating a vetted set of packages from Hackage.
description: Please see <http://www.stackage.org/package/stackage> for a description and documentation.
homepage: https://github.com/fpco/stackage