@@ -19,7 +19,7 @@ import qualified Codec.Archive.Tar.Entry as Tar
1919import qualified Codec.Compression.GZip as GZip
2020import Control.Applicative
2121import Control.Concurrent.Execute (ActionContext (.. ))
22- import Control.Monad (unless , void , liftM , filterM , foldM )
22+ import Control.Monad (unless , void , liftM , filterM , foldM , when )
2323import Control.Monad.Catch
2424import Control.Monad.IO.Class
2525import Control.Monad.Logger
@@ -90,6 +90,8 @@ data SDistOpts = SDistOpts
9090 -- ^ Whether to sign the package
9191 , sdoptsSignServerUrl :: String
9292 -- ^ The URL of the signature server
93+ , sdoptsBuildTarball :: Bool
94+ -- ^ Whether to build the tarball
9395 }
9496
9597newtype CheckException
@@ -343,7 +345,7 @@ checkSDistTarball opts tarball = withTempTarGzContents tarball $ \pkgDir' -> do
343345 pkgDir <- (pkgDir' </> ) `liftM`
344346 (parseRelDir . FP. takeBaseName . FP. takeBaseName . toFilePath $ tarball)
345347 -- ^ drop ".tar" ^ drop ".gz"
346- buildExtractedTarball pkgDir
348+ when (sdoptsBuildTarball opts) ( buildExtractedTarball pkgDir)
347349 unless (sdoptsIgnoreCheck opts) (checkPackageInExtractedTarball pkgDir)
348350
349351checkPackageInExtractedTarball :: (StackM env m , HasEnvConfig env , MonadBaseUnlift IO m )
0 commit comments