diff options
author | EuAndreh <eu@euandre.org> | 2025-03-28 17:11:47 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2025-03-29 16:25:53 -0300 |
commit | 12c8206705657ecccf046a000c2834ddf2cad7d7 (patch) | |
tree | 347d272bfba5004d02534d0058589ac06f25f733 /Makefile | |
parent | Makefile: Enable re-generation of renewed public.asc key (diff) | |
download | euandre.org-12c8206705657ecccf046a000c2834ddf2cad7d7.tar.gz euandre.org-12c8206705657ecccf046a000c2834ddf2cad7d7.tar.xz |
src/content/.well-known/security.txt: Derive it
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -126,12 +126,17 @@ derived-assets = \ $(articles.indexentry) \ $(articles.feedentry) \ $(articles.sortdata) \ + email.txt \ + baseurl.txt \ + expiry.txt \ + src/content/.well-known/security.txt \ side-assets = \ src/collections/*/*/*/*/*.html.*.txt \ src/collections/*/index.html.*.txt \ src/collections/*/*.sortdata \ src/pages/*/*.html.*.txt \ + src/content/.well-known/ \ @@ -161,6 +166,24 @@ $(contents.gz): src/content/public.asc: gpg --export --armour "`jq -r '.email' < meta.json`" > $@ +email.txt: meta.json + jq -r '.email' < meta.json > $@ + +baseurl.txt: meta.json + jq -r '.baseurl' < meta.json > $@ + +expiry.txt: src/content/public.asc + gpg --show-key --with-colons src/content/public.asc | \ + awk -F: '/^pub:/ { print $$7 }' | \ + xargs -I% date -Is -d@% > $@ + +src/content/.well-known/security.txt: email.txt baseurl.txt expiry.txt + mkdir -p $(@D) + printf 'Contact: mailto:%s\n' "`cat email.txt`" > $@ + printf 'Expires: %s\n' "`cat expiry.txt`" >> $@ + printf 'Encryption: %s/public.asc\n' "`cat baseurl.txt`" >> $@ + printf 'Preferred-Languages: en, pt, fr, eo, es\n' >> $@ + check-unit: |