diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-05-14 19:05:41 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-05-14 19:05:41 +0200 |
| commit | c81cabfcbfd2b91a7ce82168fdea4f9af6788b62 (patch) | |
| tree | 32a6a9125249b5bfaa35d38dcb35403c4329a3d8 /src | |
| parent | 3b7b15f381fbee648784895067cff165f975c360 (diff) | |
| download | slackbuilder-c81cabfcbfd2b91a7ce82168fdea4f9af6788b62.tar.gz | |
Replace extern rm rf call with a function
Diffstat (limited to 'src')
| -rw-r--r-- | src/SlackBuilder/Update.hs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/SlackBuilder/Update.hs b/src/SlackBuilder/Update.hs index 918db66..c515f4b 100644 --- a/src/SlackBuilder/Update.hs +++ b/src/SlackBuilder/Update.hs @@ -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' |
