site: home: also commit when updating wiki links

[ci skip]
This commit is contained in:
Simon Michael 2018-05-14 18:07:29 -07:00
parent e0c6a18199
commit e1230d9929
2 changed files with 8 additions and 2 deletions

View File

@ -971,7 +971,7 @@ site-build: site/hakyll-std/hakyll-std site/manual.md \
-cd site; hakyll-std/hakyll-std build
site/index.md: wiki/_Sidebar.md \
$(call def-help,site/index.md, update home page with wiki sidebar content which should be in ./wiki/_Sidebar )
$(call def-help,site/index.md, update home page with ./wiki/_Sidebar content )
(sed -ne '1,/<!-- WIKICONTENT -->/ p' site/index.md ; \
sed -ne '/^#.*User/,$$ p' wiki/_Sidebar.md \
| perl -p \
@ -983,6 +983,12 @@ site/index.md: wiki/_Sidebar.md \
> site/_index.md.$$$$ && \
mv site/_index.md.$$$$ site/index.md
site/index.md-commit: \
$(call def-help,site/index.md, update home page with ./wiki/_Sidebar content and commit if changed )
-git diff --quiet site/index.md && \
make -s site/index.md && \
git commit -q -m 'site: home: update from wiki' -m '[ci skip]' site/index.md
site-clean: site/hakyll-std/hakyll-std \
$(call def-help,site-clean, remove hakyll-generated files (& take down the website) ) #cleanolddocs
-cd site; hakyll-std/hakyll-std clean

View File

@ -20,7 +20,7 @@ echo && date --rfc-3339=seconds && \
printf "wiki: " && git -C wiki pull && \
# add latest wiki sidebar links to home page
make --no-print-directory site/index.md && \
make --no-print-directory site/index.md-commit && \
# ensure GHC can handle non-ascii
export LANG=en_US.UTF-8 && \