stack-clean-old 0.5 → 0.5.1
raw patch · 5 files changed
+25/−17 lines, 5 files
Files
- ChangeLog.md +5/−0
- README.md +15/−12
- src/Directories.hs +3/−3
- src/Main.hs +1/−1
- stack-clean-old.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,10 @@ # Release history for stack-clean-old +## 0.5.1 (2023-12-17)+- listStackSubdirs: sort after filtering+- Directory: ignore non-directories, like .DS_Store files (#19,+ thanks to @0rphee for reporting #18)+ ## 0.5 (2023-09-13) - simpler dry run output and use simple-prompt yesNo - add --yes option for --delete
README.md view
@@ -4,8 +4,9 @@ snapshot builds and ghc versions to recover diskspace. ## Usage-`stack-clean-old [size|list|remove|keep-minor|purge-older|delete-work] [(-P|--project)|(-G|--global)|(-C|--compilers)|(-T|--tarballs)] [(-s|--subdirs)|(-r|--recursive)] [-d|--delete] [GHCVER]`-+```+stack-clean-old [size|list|remove|keep-minor|purge-older|delete-work] [(-P|--project)|(-G|--global)|(-C|--compilers)|(-T|--tarballs)] [(-s|--subdirs)|(-r|--recursive)] [-d|--delete] [GHCVER]`+``` In a project directory it acts on `.stack-work/install/` by default, otherwise on `${STACK_ROOT}/{snapshots,programs}/` (the default *Stack root* is `~/.stack/`):@@ -114,10 +115,12 @@ (Note you can also run this tool via `stack clean-old`.) To get help you can run `stack-clean-old --help` or just:-```ShellSession-$ stack-clean-old --version+`$ stack-clean-old --version`+``` 0.5-$ stack-clean-old+```+`$ stack-clean-old --help`+``` Stack clean up tool Usage: stack-clean-old [--version] COMMAND@@ -143,13 +146,13 @@ ### Command options Most of the commands have similar options, e.g.: -```shellsession-$ stack-clean-old remove --help-Usage: stack-clean-old remove [(-d|--delete) [-y|--yes]]- [(-P|--project) | (-S|--snapshots) |- (-C|--compilers) | (-T|--tarballs) |- (-G|--global)]- [(-s|--subdirs) | (-r|--recursive)] GHCVER+`$ stack-clean-old remove --help`+```+Usage: stack-clean-old remove [(-d|--delete) [-y|--yes]] + [(-P|--project) | (-S|--snapshots) | + (-C|--compilers) | (-T|--tarballs) | + (-G|--global)] + [(-s|--subdirs) | (-r|--recursive)] GHCVER [-o|--platform SYSTEM] Remove for a ghc version
src/Directories.hs view
@@ -10,7 +10,7 @@ ) where -import Control.Monad (forM_, unless, when)+import Control.Monad (filterM, forM_, unless, when) import Data.List.Extra import SimpleCmd ((+-+), #if MIN_VERSION_simple_cmd(0,2,0)@@ -71,7 +71,7 @@ listPlatforms :: Maybe String -> IO [FilePath] listPlatforms msystem = do- platforms <- listDirectory "."+ platforms <- listDirectory "." >>= filterM doesDirectoryExist case msystem of Nothing -> return platforms Just s ->@@ -83,7 +83,7 @@ listCurrentDirectory :: IO [FilePath] listCurrentDirectory =- filter (\d -> head d /= '.') <$> listDirectory "."+ listDirectory "." >>= filterM doesDirectoryExist . filter (\d -> head d /= '.') #if !MIN_VERSION_simple_cmd(0,2,0) warning :: String -> IO ()
src/Main.hs view
@@ -240,7 +240,7 @@ listStackSubdirs :: IO [FilePath] listStackSubdirs =- listDirectory "." >>= filterM (doesDirectoryExist . (</> ".stack-work")) . L.sort+ listDirectory "." >>= fmap L.sort . filterM (doesDirectoryExist . (</> ".stack-work")) remindDelete :: Deletion -> IO () remindDelete deletion =
stack-clean-old.cabal view
@@ -1,5 +1,5 @@ name: stack-clean-old-version: 0.5+version: 0.5.1 synopsis: Clean away old stack build artifacts description: A tool for removing old .stack-work/install builds and