home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 937229214a00abebd789232ac9035682ebcd97c0
parent c0ab62f0baed104b95fc53a0a1dedb64d2ea47a0
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Sat, 23 May 2020 13:51:51 +0200

Makefile: use pre-commit target for pre-commit

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
M.githooks/pre-commit | 2+-
MMakefile | 8+++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/.githooks/pre-commit b/.githooks/pre-commit @@ -1,5 +1,5 @@ #!/bin/sh unset NIX_BUILD_SHELL export NIX_BUILD_SHELL -nix-shell -p gnumake --run 'make update-docs' +nix-shell -p gnumake --run 'make pre-commit' git add README.md docs diff --git a/Makefile b/Makefile @@ -53,12 +53,18 @@ switch: assets setup home-manager switch .PHONY: nixos-switch +.PHONY: nixos-switch nixos-switch: assets setup nixos-rebuild switch +.PHONY: install-hooks install-hooks: if [ -e .git ]; then nix-shell -p git --run 'git config core.hooksPath .githooks'; fi +.PHONY: pre-commit +pre-commit: README.md fmt update-docs + +.PHONY: fmt fmt: nixpkgs-fmt *.nix lib machines modules overlays/*.nix overlays/emacs pkgs tmp tools @@ -79,7 +85,7 @@ clean-www: # Documentation build and publishing .PHONY: update-docs -update-docs: README.md +update-docs: @echo "Updating docs references…" $(EMACS) --batch --directory $(DOTEMACS)/lisp/ \ --load lib/lisp/docs.el \