stack-clean-old 0.4.5 → 0.4.6
raw patch · 5 files changed
+17/−7 lines, 5 files
Files
- ChangeLog.md +6/−1
- README.md +5/−0
- src/GHC.hs +1/−1
- src/Main.hs +3/−3
- stack-clean-old.cabal +2/−2
ChangeLog.md view
@@ -1,4 +1,9 @@-# Release history for stack-clean-old-work+# Release history for stack-clean-old++## 0.4.6 (2022-02-03)+- fix --recursive and --subdirs to work again+- show --recursive dir paths+- ignore non-ghc dirs in ~/.stack/programs/ ## 0.4.5 (2022-01-14) - fix multiple reminders about using --delete
README.md view
@@ -43,6 +43,11 @@ using them, so removals should be done carefully but can recover a lot of diskspace. +Further the commands can use `--subdirs` or `--recursive` to run over+the projects in subdirs under the current directory or+all matching `.stack-work` dirs from the current directory and below+respectively.+ ### Example usage List a project's builds: ```ShellSession
src/GHC.hs view
@@ -33,7 +33,7 @@ getGhcInstallDirs :: Maybe Version -> Maybe String -> IO [FilePath] getGhcInstallDirs mghcver msystem = do setStackProgramsDir msystem- sortOn ghcInstallVersion <$> globDirs matchVersion+ sortOn ghcInstallVersion <$> globDirs ("ghc-" ++ matchVersion) where matchVersion = case mghcver of
src/Main.hs view
@@ -106,13 +106,13 @@ then map (dropPrefix "./" . takeDirectory) <$> findStackWorks else listStackSubdirs) >>= if needinstall- then filterM (doesDirectoryExist . (</> "install"))+ then filterM (doesDirectoryExist . (</> ".stack-work/install")) else return forM_ dirs $ \dir -> if changedir then withCurrentDirectory dir $ do- putStrLn $ "\n" ++ takeFileName dir ++ "/"+ putStrLn $ "\n" ++ (if recursion == Recursive then id else takeFileName) dir ++ "/" act dir else act dir Nothing -> act ""@@ -226,7 +226,7 @@ listStackSubdirs :: IO [FilePath] listStackSubdirs =- listDirectory "." >>= filterM (\f -> doesDirectoryExist (f </> ".stack-work")) . L.sort+ listDirectory "." >>= filterM (doesDirectoryExist . (</> ".stack-work")) . L.sort remindDelete :: Deletion -> IO () remindDelete deletion =
stack-clean-old.cabal view
@@ -1,6 +1,6 @@ name: stack-clean-old-version: 0.4.5-synopsis: Clean away old stack build artefacts+version: 0.4.6+synopsis: Clean away old stack build artifacts description: A tool for removing old .stack-work/install builds and .stack/snapshots & programs for older ghc versions