dev: make site: update

This commit is contained in:
root 2022-12-01 09:21:19 -10:00 committed by Simon Michael
parent 5733b24cf4
commit e3ae1916f1

View File

@ -830,28 +830,30 @@ shakehelp-watch: \
$(call def-help,shakehelp-watch, rerender Shake.hs's help when it changes) $(call def-help,shakehelp-watch, rerender Shake.hs's help when it changes)
ls Shake.hs | entr -c ./Shake.hs ls Shake.hs | entr -c ./Shake.hs
# This rule, for updating the website, gets called on hledger.org by: # The following rule, for updating the website, gets called on hledger.org by:
# 1. github-post-receive (github webhook handler), when something is pushed # 1. github-post-receive (github webhook handler), when something is pushed
# to the main or wiki repos on Github. Config: # to the main or wiki repos on Github. Config:
# /etc/supervisord.conf -> [program:github-post-receive] # /etc/supervisord.conf -> [program:github-post-receive]
# /etc/github-post-receive.conf # /etc/github-post-receive.conf
# 2. cron, nightly. Config: /etc/crontab # 2. cron, nightly. Config: /etc/crontab
# 3. manually: "make site" on hledger.org, or "make hledgerorg" elsewhere (cf Makefile.local). # 3. manually: "make site" on hledger.org, or "make hledgerorg" elsewhere (cf Makefile.local).
# This uses the existing Shake executable without rebuilding it,
# as we don't want to immediately execute new code from any collaborator.
# make site - rebuilds current release and dev manuals
# make siteall - rebuilds all manual versions
.PHONY: site .PHONY: site
site%: $(call def-help,site, update the hledger.org website (run on hledger.org, or run "make hledgerorg" elsewhere) )
@[ ! -x Shake ] \ # Use the existing Shake executable without recompiling it, so as not to automatially run unreviewed code by hook ? I think this no longer applies.
&& echo 'Please run "make Shake" first (manual compilation of Shake.hs is required)' \ # site: $(call def-help,site-build, update the hledger.org website (run this on hledger.org, or run "make hledgerorg" elsewhere) )
|| ( \ # @[ ! -x Shake ] \
echo; \ # && echo 'Please run "make Shake" first (manual compilation required for safety)' \
./Shake -V webmanuals; \ # || ( \
make -C site build$*; \ # echo; \
) 2>&1 | tee -a site.log # ./Shake -V site; \
# once VPS can build Shake again, replace the Shake/make lines with # ) 2>&1 | tee -a site.log
# ./Shake -V site; \
site: Shake \
$(call def-help,site, update the hledger.org website (run on hledger.org, or run "make hledgerorg" elsewhere) )
./Shake -V site 2>&1 | tee -a site.log
BROWSE=open BROWSE=open
BROWSEDELAY=5 BROWSEDELAY=5