diff --git a/Makefile b/Makefile index 2f4d331f4..8b1c054dc 100644 --- a/Makefile +++ b/Makefile @@ -712,7 +712,10 @@ site: \ $(call def-help,site, update the hledger.org website (run on prod) ) @[[ ! -x Shake ]] \ && echo 'Please run "make Shake" first (manual compilation of Shake.hs is required)' \ - || ./Shake hledgerorg + || ( \ + echo; \ + ./Shake hledgerorg \ + ) 2>&1 | tee -a site.log ############################################################################### $(call def-help-subheading,RELEASING:) diff --git a/Shake.hs b/Shake.hs index 9c2aafe15..434fd5ab2 100755 --- a/Shake.hs +++ b/Shake.hs @@ -447,19 +447,13 @@ main = do -- 2. cron, nightly. Config: /etc/crontab -- 3. manually (make site). phony "hledgerorg" $ do - -- out1 <- fromStdout <$> + -- XXX ideally we would ensure here that output is logged in site.log, + -- but I don't know how to do that for the Shake rules. + -- Instead we'll do the logging in "make site". cmd_ Shell - -- XXX ideally we would ensure here that output is logged, - -- but I don't know how to do that for the Shake rules. - -- Instead we'll do the logging in "make site". - -- -- run this sequence of commands, stopping if one fails: - -- "(" - -- -- and log all output as well as echoing it - -- ") 2>&1 | tee -a site.log" -- print timestamp. On mac, use brew-installed GNU date. - "echo" - "&& PATH=\"/usr/local/opt/coreutils/libexec/gnubin:$PATH\" date --rfc-3339=seconds" + "PATH=\"/usr/local/opt/coreutils/libexec/gnubin:$PATH\" date --rfc-3339=seconds" -- pull latest wiki repo "&& printf 'wiki repo: ' && git -C wiki pull" -- pull latest main repo - sometimes already done by webhook, not always