From f35ae53e4a15daa3c6f5b5453406efede79d7486 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 27 Feb 2023 13:39:48 -0300 Subject: Makefile: Also check if private is out of sync --- Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index dd968f5..9036929 100644 --- a/Makefile +++ b/Makefile @@ -107,7 +107,12 @@ check-fixme: check-dirty-public: if ! git diff --quiet || ! git diff --quiet --staged; then \ - printf 'Dirty tilde repository.\n' >&2; \ + printf 'Dirty ~/.usr/ repository.\n' >&2; \ + exit 1; \ + fi + if git status --short --branch --porcelain | \ + head -n1 | grep -E '(ahead|behind)'; then \ + printf '~/.usr/ of sync with origin.\n' >&2; \ exit 1; \ fi @@ -117,6 +122,11 @@ check-dirty-private: printf 'Dirty private tilde repository.\n' >&2; \ exit 1; \ fi + if git -C $(PRIV_CONFIG) status --short --branch --porcelain | \ + head -n1 | grep -E '(ahead|behind)'; then \ + printf 'Private of sync with origin.\n' >&2; \ + exit 1; \ + fi check-dirty-pass: if ! git -C $(PASSWORD_STORE_DIR) diff --quiet || \ @@ -136,15 +146,9 @@ check-opt: check-pod: podchecker bin/z -check-sync: - if git status --short --branch --porcelain | head -n1 | grep -E '(ahead|behind)'; then \ - printf 'Out of sync with origin.\n' >&2; \ - exit 1; \ - fi - check: check-shellcheck check-perlcritic check-nixfmt check-fixme \ check-dirty-public check-dirty-private check-dirty-pass \ - check-opt check-pod check-sync + check-opt check-pod @cd $(PRIV_CONFIG) && $(MAKE) $@ clean: -- cgit v1.2.3