From 87b532b43db38660bf297f3921e7941cd41e2394 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 19 Sep 2021 06:59:51 -1000 Subject: [PATCH] ;imp: tools: ./Shake site builds the website --- Makefile | 3 +-- Shake.hs | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aa814bfc2..560afa718 100644 --- a/Makefile +++ b/Makefile @@ -823,8 +823,7 @@ site: $(call def-help,site, update the hledger.org website (run on hledger.org, && echo 'Please run "make Shake" first (manual compilation of Shake.hs is required)' \ || ( \ echo; \ - ./Shake -V webmanuals; \ - make -C site build; \ + ./Shake -V site; \ ) 2>&1 | tee -a site.log BROWSE=open diff --git a/Shake.hs b/Shake.hs index b55376fac..9dd6da9e2 100755 --- a/Shake.hs +++ b/Shake.hs @@ -53,7 +53,6 @@ import "base" Control.Exception as C -- required packages, keep synced with Makefile -> SHAKEDEPS: import "directory" System.Directory as S (getDirectoryContents) import "extra" Data.List.Extra hiding (headDef, lastDef) -import "process" System.Process import "regex" Text.RE.TDFA.String import "regex" Text.RE.Replace import "safe" Safe @@ -82,6 +81,7 @@ usage = ,"./Shake changelogs [-c] [-n/--dry-run]" ," update CHANGES.md files, adding new commits & headings" ,"./Shake docs [-c] update all program docs (CLI help, manuals, changelogs)" + ,"./Shake site update (render) the website, in ./site" ,"./Shake build [PKGS] build hledger packages and their embedded docs" ,"./Shake clean remove generated texts, manuals" ,"./Shake Clean also remove object files, Shake's cache" @@ -741,6 +741,14 @@ main = do ,"changelogs" ] + -- Update (render) the website, which should be checked out as ./site + phony "site" $ do + need [ + "webmanuals" + ,".ROADMAP.md" + ] + cmd_ "make -C site build" + ".ROADMAP.md" %> \out -> do let src = "ROADMAP.org" liftIO $ writeFile out $ unlines [