From e2fee12f06db4f3e4c811c6de8cea54a09129878 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 10 Apr 2025 18:25:30 -0300 Subject: Makefile: Add check-unit-updatedat --- Makefile | 11 ++++++++++- deps.mk | 10 ++++++++++ mkdeps.sh | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 924fb1c..266e260 100644 --- a/Makefile +++ b/Makefile @@ -289,6 +289,15 @@ check-unit-sorting: src/sort-expected.txt src/sort-given.txt diff -U10 src/sort-expected.txt src/sort-given.txt +.SUFFIXES: .updatedat-check +sources.updatedat-check = $(sources.adoc:.adoc=.updatedat-check) +$(sources.updatedat-check): + . ./$*.conf && if [ -n "$$updatedat_epoch" ] && \ + [ "$$updatedat_epoch" -le "$$date_epoch" ]; then exit 3; fi + +check-unit-updatedat: $(sources.updatedat-check) + + .SUFFIXES: .links-internal-check sources.links-internal-check = $(sources.adoc:.adoc=.links-internal-check) $(sources.links-internal-check): $(sources.html) @@ -302,7 +311,7 @@ check-unit-links-external: check-unit-links: check-unit-links-internal check-unit-links-external -check-unit: check-unit-sorting check-unit-links +check-unit: check-unit-sorting check-unit-updatedat check-unit-links integration-tests = \ diff --git a/deps.mk b/deps.mk index d4ace6a..acc6f49 100644 --- a/deps.mk +++ b/deps.mk @@ -81,6 +81,16 @@ src/content/incidents/index.snippets.gz: src/content/incidents/index.snippets src/content/blog/feed.xml.gz: src/content/blog/feed.xml src/content/incidents/feed.xml.gz: src/content/incidents/feed.xml +src/content/about.updatedat-check: src/content/about.conf +src/content/index.updatedat-check: src/content/index.conf +src/content/pricing.updatedat-check: src/content/pricing.conf +src/content/privacy.updatedat-check: src/content/privacy.conf +src/content/terms.updatedat-check: src/content/terms.conf +src/content/blog/1970/01/01/launch.updatedat-check: src/content/blog/1970/01/01/launch.conf +src/content/blog/2000/01/01/feature-ann.updatedat-check: src/content/blog/2000/01/01/feature-ann.conf +src/content/incidents/2000/01/01/service-start.updatedat-check: src/content/incidents/2000/01/01/service-start.conf +src/content/blog/index.updatedat-check: src/content/blog/index.conf +src/content/incidents/index.updatedat-check: src/content/incidents/index.conf src/content/about.links-internal-check: src/content/about.links src/content/index.links-internal-check: src/content/index.links src/content/pricing.links-internal-check: src/content/pricing.links diff --git a/mkdeps.sh b/mkdeps.sh index 99a3cd7..119b255 100755 --- a/mkdeps.sh +++ b/mkdeps.sh @@ -53,6 +53,7 @@ files | sed 's/^\(.*\)\.adoc$/\1.snippets.gz:\t\1.snippets/' listings | sed 's|^\(.*\)/index\.adoc$|\1/feed.xml.gz:\t\1/feed.xml|' printf '\n' +files | sed 's/^\(.*\)\.adoc$/\1.updatedat-check:\t\1.conf/' files | sed 's/^\(.*\)\.adoc$/\1.links-internal-check:\t\1.links/' files | sed 's/^\(.*\)\.adoc$/\1.caslinks:\t\1.links/' printf '\n' -- cgit v1.2.3