From 306975e6acabf5ce21294b96b05c3e4c119accf3 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 7 Sep 2020 06:37:50 -0700 Subject: [PATCH] ;shake cabalfiles updates .cabal files --- Shake.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Shake.hs b/Shake.hs index 2ddaff5dc..2d9d32f2f 100755 --- a/Shake.hs +++ b/Shake.hs @@ -75,6 +75,7 @@ usage = -- TODO: commit, show commit ,"./Shake changelogs[-dry] add new commits, headings to */CHANGES.md" -- ,"./Shake [PKG/]CHANGES.md[-dry] update (or preview) one changelog" + ,"./Shake cabalfiles update .cabal files from */package.yaml" ,"./Shake build [PKGS] build hledger packages and their embedded docs" ,"./Shake clean clean generated help texts, manuals" ,"./Shake Clean also clean object files, Shake's cache" @@ -147,7 +148,7 @@ main = do ] pkgdirs = packages pkgandprojdirs = "" : pkgdirs - + cabalfiles = [p <.> "cabal" | p <- packages] changelogs = map ( "CHANGES.md") pkgandprojdirs -- doc files (or related targets) that should be generated @@ -361,6 +362,11 @@ main = do | pkg <- pkgs ] + -- regenerate .cabal files from package.yaml's, using stack (also installs deps) + phony "cabalfiles" $ do + cmd Shell "stack build --dry-run" :: Action () + + -- regenerate Hledger/Cli/Commands/*.txt from the .md source files for CLI help phony "commandtxts" $ need commandtxts commandtxts |%> \out -> do