Skip to content
Snippets Groups Projects
Commit fc3c80fc authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Use .tar.gz for source package extension and tweak sdist info message.

parent 050b881c
No related branches found
No related tags found
No related merge requests found
...@@ -124,11 +124,12 @@ sdist tmpDir targetPref verbose snapshot pps pkg_descr_orig = do ...@@ -124,11 +124,12 @@ sdist tmpDir targetPref verbose snapshot pps pkg_descr_orig = do
unlines $ map (appendVersion date) $ lines $ contents unlines $ map (appendVersion date) $ lines $ contents
else copyFileVerbose verbose descFile targetDescFile else copyFileVerbose verbose descFile targetDescFile
let tarBallFilePath = targetPref `joinFileName` tarBallName pkg_descr
system $ "(cd " ++ tmpDir system $ "(cd " ++ tmpDir
++ ";tar cf - " ++ (nameVersion pkg_descr) ++ ") | gzip -9 >" ++ ";tar cf - " ++ (nameVersion pkg_descr) ++ ") | gzip -9 >"
++ (targetPref `joinFileName` (tarBallName pkg_descr)) ++ tarBallFilePath
system $ "rm -rf " ++ tmpDir system $ "rm -rf " ++ tmpDir
putStrLn "Source tarball created." putStrLn $ "Source tarball created: " ++ tarBallFilePath
where where
updatePackage f pd = pd { package = f (package pd) } updatePackage f pd = pd { package = f (package pd) }
...@@ -167,7 +168,7 @@ copyFileTo verbose dir file = do ...@@ -167,7 +168,7 @@ copyFileTo verbose dir file = do
-- |The file name of the tarball -- |The file name of the tarball
tarBallName :: PackageDescription -> FilePath tarBallName :: PackageDescription -> FilePath
tarBallName p = (nameVersion p) ++ ".tgz" tarBallName p = (nameVersion p) ++ ".tar.gz"
nameVersion :: PackageDescription -> String nameVersion :: PackageDescription -> String
nameVersion = showPackageId . package nameVersion = showPackageId . package
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment