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 * Print "Still Alive" while checking, to avoid Travis timeouts
* Include `stackage upload-nightly` command * Include `stackage upload-nightly` command
* Optional plan checking
## 0.4.0 ## 0.4.0

View File

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

View File

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

View File

@ -78,7 +78,10 @@ main =
help "Enable profiling when building") <*> help "Enable profiling when building") <*>
switch switch
(long "verbose" <> short 'v' <> (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 nightlyUploadFlags = fromString <$> strArgument
(metavar "DATE" <> (metavar "DATE" <>

View File

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