Commit 295e19ea90589f2b3bcb629f5eaffd0c2e5d6ecd Parent: 89f0b82c2b06a7ffa5865a78b99aa1f96f3d7660 Author: mcol <mcol@posteo.net> Date: 2021-11-21 18:23:51 +0000 Committer: mcol <mcol@posteo.net> Committed: 2021-11-21 18:23:51 +0000 Ensure all folders are created ahead of generation
src/Repositories.hs Modified
@@ -67,11 +67,13 @@ branches <- getRefs "refs/heads/" let scope = package env name (repoDescription repo) commits tree tags branches + -- Create the destination folders + liftIO . createDirectoryIfMissing True $ output </> "commit" + liftIO . createDirectoryIfMissing True $ output </> "file" + -- Run the generator -- - liftIO . mapM_ (genRepo output scope) $ envTemplates env let force = envForce env - liftIO . createDirectoryIfMissing True $ output </> "commits" - liftIO . createDirectoryIfMissing True $ output </> "files" + liftIO . mapM_ (genRepo output scope) $ envTemplates env liftIO . mapM_ (genTarget output scope force $ envCommitTemplate env) $ commits liftIO . mapM_ (genTarget output scope True $ envFileTemplate env) $ tree -- TODO: detect file changes