]> arthur.barton.de Git - ansible-collection-boilerplate.git/blobdiff - Makefile
how-to-release.md: Fix "git push" command
[ansible-collection-boilerplate.git] / Makefile
index df6618093b998cd7e1203fb19494d88e7a523d1e..5a33f4971702f822a014450d9341bc959f3ce87e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,16 @@ default: all
 include Makefile.boilerplate
 
 check: check-ansible
+       if command -v mdl >/dev/null; then make check-mdl; fi
+       if command -v shellcheck >/dev/null; then make check-shellcheck; fi
+
+check-mdl:
+       mdl -g -r '~MD013,~MD029' -w .
+
+check-shellcheck:
+       shellcheck \
+        bin/ansible-boilerplate \
+        bin/a bin/ap bin/aps
 
 install:
 
@@ -29,7 +39,7 @@ dist: all $(VENV_BIN)/ansible-galaxy
 distcheck: dist
 #      Run tests on distribution archive ...
        mkdir -p "$(DIST_D)/check"
-       tar -C "$(DIST_D)/check" -xzf "$(DIST_D)"/*.tar.gz
+       tar -C "$(DIST_D)/check" -xzf $$(find "$(DIST_D)" -name '*.tar.gz' | sort -Vr | head -n1)
        test -e "$(VENV_D)" && ln -fs "$(VENV_D)" "$(DIST_D)/check/.venv"
        make -C "$(DIST_D)/check" check
 #      Clean up ...