Replace extern rm rf call with a function
This commit is contained in:
@ -61,13 +61,10 @@ import System.Console.ANSI
|
||||
, Color(..)
|
||||
, ConsoleLayer(..)
|
||||
)
|
||||
import Control.Monad (filterM, void)
|
||||
import Control.Monad (filterM)
|
||||
import Data.List (isPrefixOf, isSuffixOf, partition)
|
||||
import Conduit (runConduitRes, (.|), yield)
|
||||
import Data.Functor ((<&>))
|
||||
import Data.Bifunctor (Bifunctor(..))
|
||||
import Data.Conduit.Tar (tarFilePath)
|
||||
import qualified Data.Conduit.Lzma as Lzma
|
||||
|
||||
getAndLogLatest :: PackageDescription -> SlackBuilderT (Maybe PackageUpdateData)
|
||||
getAndLogLatest description = do
|
||||
@ -182,10 +179,7 @@ reuploadWithTemplate downloadTemplate commands packagePath version = do
|
||||
appendTarExtension = (<.> "tar.xz")
|
||||
in fmap (appendTarExtension tarballPath,)
|
||||
$ withCurrentDirectory (takeDirectory tarballPath)
|
||||
$ runConduitRes $ yield archiveBaseFilename
|
||||
.| void tarFilePath
|
||||
.| Lzma.compress Nothing
|
||||
.| sinkFileAndHash (appendTarExtension archiveBaseFilename)
|
||||
$ createLzmaTarball archiveBaseFilename archiveBaseFilename
|
||||
handleReupload relativeTarball = do
|
||||
liftIO $ putStrLn $ "Upload the source tarball " <> relativeTarball
|
||||
uploadSource relativeTarball category'
|
||||
|
Reference in New Issue
Block a user