From f8f11368998f911eda8add42e9b5500e9ee1dd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Sat, 1 May 2021 19:13:35 +0200 Subject: [PATCH] mk: Implement git cleanliness check --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index d9b53d9..cc85295 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,13 @@ sign: $(patsubst %,%.sig,$(wildcard *.zone)) %.sig: % gpg -o $@ --detach-sign $< +.PHONY: check-clean +check-clean: + [ ! -e .git ] || git diff-index --exit-code HEAD + [ ! -e .git ] || \ + git ls-files --other --directory --exclude-standard | \ + sed -n '/.*\.zone/{p;q1}' + upload: printf 'put %s\n' *.zone *.sig | sftp dns.parabox.it-syndikat.org:zones/