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