From e1230d99295f7e4b635604ebb2abcd489ceb7fd5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Mon, 14 May 2018 18:07:29 -0700 Subject: [PATCH] site: home: also commit when updating wiki links [ci skip] --- Makefile | 8 +++++++- tools/deploy.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 40bc8aa4f..8bd8bee10 100644 --- a/Makefile +++ b/Makefile @@ -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,// 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 diff --git a/tools/deploy.sh b/tools/deploy.sh index 6c76391dc..fb58179a8 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -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 && \