Fix archive name generation
Some checks failed
Build / audit (push) Failing after 20s
Build / test (push) Failing after 19s

This commit is contained in:
Eugen Wissner 2024-05-25 07:54:05 +02:00
parent c81cabfcbf
commit 6d0248b4f8
Signed by: belka
GPG Key ID: A27FDC1E8EE902C0
2 changed files with 3 additions and 1 deletions

View File

@ -186,6 +186,8 @@ cloneAndArchive repo tarballPath tagPrefix = do
>> createLzmaTarball repositoryTarballPath repositoryArchivePath >> createLzmaTarball repositoryTarballPath repositoryArchivePath
>> removePathForcibly repositoryTarballPath >> removePathForcibly repositoryTarballPath
-- | Takes a directory as input and a file name as output and creates a tar.xz
-- archive from the given directory.
createLzmaTarball :: FilePath -> FilePath -> IO (Digest MD5) createLzmaTarball :: FilePath -> FilePath -> IO (Digest MD5)
createLzmaTarball input output = runConduitRes $ yield input createLzmaTarball input output = runConduitRes $ yield input
.| void tarFilePath .| void tarFilePath

View File

@ -179,7 +179,7 @@ reuploadWithTemplate downloadTemplate commands packagePath version = do
appendTarExtension = (<.> "tar.xz") appendTarExtension = (<.> "tar.xz")
in fmap (appendTarExtension tarballPath,) in fmap (appendTarExtension tarballPath,)
$ withCurrentDirectory (takeDirectory tarballPath) $ withCurrentDirectory (takeDirectory tarballPath)
$ createLzmaTarball archiveBaseFilename archiveBaseFilename $ createLzmaTarball archiveBaseFilename (appendTarExtension archiveBaseFilename)
handleReupload relativeTarball = do handleReupload relativeTarball = do
liftIO $ putStrLn $ "Upload the source tarball " <> relativeTarball liftIO $ putStrLn $ "Upload the source tarball " <> relativeTarball
uploadSource relativeTarball category' uploadSource relativeTarball category'